<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sandkasten-SEO &#187; Affiliate</title>
	<atom:link href="http://www.sandkasten-seo.de/tag/affiliate/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sandkasten-seo.de</link>
	<description>Mit Schippe und Förmchen optimieren</description>
	<lastBuildDate>Tue, 24 Aug 2010 12:30:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Conversionrate auf Keywordebene bestimmen</title>
		<link>http://www.sandkasten-seo.de/2010/05/04/conversionrate-auf-keywordebene-bestimmen/</link>
		<comments>http://www.sandkasten-seo.de/2010/05/04/conversionrate-auf-keywordebene-bestimmen/#comments</comments>
		<pubDate>Tue, 04 May 2010 21:13:56 +0000</pubDate>
		<dc:creator>Sandkastenseo</dc:creator>
				<category><![CDATA[Affiliate Marketing]]></category>
		<category><![CDATA[Affiliate]]></category>
		<category><![CDATA[Conversion]]></category>
		<category><![CDATA[Tracking]]></category>

		<guid isPermaLink="false">http://www.sandkasten-seo.de/?p=120</guid>
		<description><![CDATA[Statistiken der Analyse-Dienste Ist man im Affiliate-Bereich unterwegs, steht man beim Messen der Conversion Rate auf der Keyword-Ebene vor einem Dilemma: Tracking-Dienste wie Google Analytics geben die Conversion-Rate zwar pro Keyword an, messen dabei aber nur die ausgehenden Klicks und nicht die erfolgten Sales/Leads (im folgenden der Einfachheit halber nur noch &#8220;Sales&#8221;). Das hei&#223;t, hier [...]]]></description>
			<content:encoded><![CDATA[<h3>Statistiken der Analyse-Dienste</h3>
<p>Ist man im Affiliate-Bereich unterwegs, steht man beim Messen der <strong>Conversion Rate</strong> auf der <strong>Keyword</strong>-Ebene vor einem Dilemma: Tracking-Dienste wie <a href="http://www.google.com/intl/de_ALL/analytics/">Google Analytics</a> geben die Conversion-Rate zwar pro Keyword an, messen dabei aber nur die ausgehenden Klicks und nicht die erfolgten Sales/Leads (im folgenden der Einfachheit halber nur noch &#8220;Sales&#8221;). Das hei&#223;t, hier kann ich die Kennzahl</p>
<p><code>Ausgehende Besucher : Gesamte Besucher f&#252;r Keyword x</code></p>
<p>anschauen. Hm. Das ist zwar schon spannend, aber wenig aussagekr&#228;ftig, wenn ich wissen m&#246;chte, welche Keywords zu den meisten Sales f&#252;hren.</p>
<p><span id="more-120"></span><br />
<h3>Statistiken der Affiliate-Netzwerke</h3>
<p>Die Affiliate-Netzwerke bieten in ihren Statistiken lediglich die M&#246;glichkeit, nach dem Referer (der meist die eigene Seite ist) zu gruppieren, sodass ich zwar die Gesamtzahl von Conversions pro Klicks (bzw. pro Ausgehenden Besuchern, um in obiger Darstellung zu bleiben) ermitteln kann, das aber unabh&#228;ngig vom Keyword. Die Kennzahl</p>
<p><code>Anzahl Sales : Ausgehende Besucher f&#252;r alle Keywords</code></p>
<p>ist auch interessant und l&#228;sst durchaus R&#252;ckschl&#252;sse auf (nicht) erf&#252;llte Erwartungen seitens der Besucher und die Conversionkraft der Zielseite zu, allerdings unabh&#228;ngig von irgendwelchen Suchbegriffen.</p>
<p>Also was tun?</p>
<h3>Sub-IDs und Session-Tracking</h3>
<p>Ohne an dieser Stelle zu tief in die Implementierungsdetails vordringen zu wollen, m&#246;chte ich ein Konzept zur Bestimmung der Conversionrate auf Keyword-Ebene vorstellen, das die Kennzahl</p>
<p><code>Anzahl Sales : Anzahl Besucher f&#252;r Keyword x</code></p>
<p>ermittelt.</p>
<p>Dazu sollte zun&#228;chst jeder frische Besucher einer Website mit einem Vermerk in seiner <strong>Session</strong> versehen werden, der den Herkunfts-Referer und damit die eingegeben Keywords enth&#228;lt.  Dazu bietet es sich an, etwa in PHP eine Session-Variable auf Vorhandensein zu pr&#252;fen und gegebenenfalls anzulegen:</p>
<pre><code>if (empty($_SESSION['kcr'])) {
    //
    // Hier Token erzeugen, in Datenbank zusammen mit dem Referer ablegen.
    [...]
    // Session-Variable f&#252;llen
    $_SESSION['kcr'] = $siteToken."-".$dateToken."-".$randomToken;
}</code></pre>
<p>Ein paar Erkl&#228;rungen zum obigen Code: die drei <strong>Token</strong> dienen zur eindeutigen Zuordnung zum Referer. Sonst werden keine Daten gespeichert. Das k&#246;nnte an dieser Stelle nat&#252;rlich auch passieren, ist aber datenschutzrechtlich eher fragw&#252;rdig und auch eher unn&#246;tig.<br />
<code><strong>$siteToken</strong></code> ist ein domainspezifischer Hash-Schl&#252;ssel, bspw. der MD5 von $_SERVER['SERVER_NAME'],<br />
<code><strong>$dateToken</strong></code> ist ein Hash-Schl&#252;ssel des aktuellen Zeitstempels,<br />
<code><strong>$randomToken</strong></code> ist eine Zufallszahl bzw. ihr Hash.</p>
<p>Diese drei Token garantieren einerseits, dass der Sale immer noch der Seite zugeordnet werden kann (&#252;ber den siteToken), und sichern andererseits, dass der Schl&#252;ssel allerh&#246;chstwahrscheinlich einzigartig ist.</p>
<p>In der Datenbank wird nun diese Dreierkombination aus Token zusammen mit dem Referer abgelegt. Die Magie kommt beim Zusammensetzen des Affiliate-Links. Hier wird nun der erzeugte Session-Wert als <strong>Sub-ID</strong> an den Link angeh&#228;ngt:</p>
<pre><code>header('location: http://clix.superclix.de/[...]&#038;linknr=123<strong style="color: red;">&#038;subid='.$_SESSION['kcr']</strong>);</code></pre>
<h3>Und jetzt?</h3>
<p>So, jetzt m&#252;ssen die Daten zusammengef&#252;hrt werden. Die Statistiken der Affiliate-Netzwerke k&#246;nnen jetzt exportiert und nach Sub-IDs gruppiert werden, w&#228;hrend die in der Datenbank abgelegten zugeh&#246;rigen Referer ebenfalls &#252;bermittelt werden. Sieht man die einzelnen Affiliate-Seiten als Satelliten und das Auswertungs-System als zentralen Master, schicken die Satelliten ihre Sub-ID-Referer-Paare an den Master, der sich wiederum die Statistiken der Netzwerke holt und die Daten zusammenf&#252;hrt. Mit ein bisschen Programmierkunst k&#246;nnen aus den Referern nun die Keywords extrahiert, den Sub-IDs und den Sales zugeordnet und damit die Conversion-Rate pro Keyword ermittelt werden.</p>
<p>Klingt jetzt alles komplizierter, als es bestimmt ist &#8211; ich hab&#8217;s selber noch nicht ausprobiert. Sollte aber durchaus mit kleinem bis mittlerem Aufwand machbar sein und sich tats&#228;chlich auch lohnen. Ideen und Verbesserungsvorschl&#228;ge sind gern gesehen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sandkasten-seo.de/2010/05/04/conversionrate-auf-keywordebene-bestimmen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Der Webgains Webservice &#8211; ein Beispiel in PHP</title>
		<link>http://www.sandkasten-seo.de/2010/03/06/der-webgains-webservice-ein-beispiel-in-php/</link>
		<comments>http://www.sandkasten-seo.de/2010/03/06/der-webgains-webservice-ein-beispiel-in-php/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 21:06:52 +0000</pubDate>
		<dc:creator>Sandkastenseo</dc:creator>
				<category><![CDATA[Affiliate Marketing]]></category>
		<category><![CDATA[Affiliate]]></category>
		<category><![CDATA[Technik]]></category>
		<category><![CDATA[Webgains]]></category>
		<category><![CDATA[Webservice]]></category>

		<guid isPermaLink="false">http://www.sandkasten-seo.de/?p=97</guid>
		<description><![CDATA[Da zum Webservice des Affiliate-Netzwerks Webgains keine einfache Anleitung verf&#252;gbar ist (oder ich sie zumindest nicht finden kann), m&#246;chte ich an dieser Stelle ein kleines PHP-Beispiel der Abfrage der vom Webservice bereitgestellten Daten anbringen. Es handelt sich um einen SOAP-Webservice, f&#252;r den PHP einen Client mitbringt, sofern das Modul aktiviert wurde. Dieser Client wird mit [...]]]></description>
			<content:encoded><![CDATA[<p>Da zum <a href="http://ws.webgains.com/aws.php">Webservice</a> des Affiliate-Netzwerks <a href="http://www.webgains.de/">Webgains</a> keine einfache Anleitung verf&#252;gbar ist (oder ich sie zumindest nicht finden kann), m&#246;chte ich an dieser Stelle ein kleines PHP-Beispiel der Abfrage der vom Webservice bereitgestellten Daten anbringen.</p>
<p><span id="more-97"></span>Es handelt sich um einen SOAP-Webservice, f&#252;r den <a href="http://php.net/manual/de/book.soap.php">PHP einen Client mitbringt</a>, sofern das Modul aktiviert wurde. Dieser Client wird mit den Webservice-Einstellungen erstellt:</p>
<pre style="background-color: #f3f3f3; border: 1px solid silver; padding: 6px; white-space: pre-wrap;"><span style="color: #ff9900;">// create a new soap client</span>
<span style="color: #000;">$webgainsClient</span> = <span style="color: #006600;">new</span> SoapClient <span style="color: #000099;">&#40;</span>
    <span style="color: #552200;">NULL</span>,
    <span style="color: #0000FF;">array</span> <span style="color: #000099;">&#40;</span>
        <span style="color: #cc0000;">&quot;location&quot;</span>   =<span style="color: #0000ff;">&gt;</span> <span style="color: #cc0000;">&quot;http://ws.webgains.com/aws.php&quot;</span>,
        <span style="color: #cc0000;">&quot;uri&quot;</span>        =<span style="color: #0000ff;">&gt;</span> <span style="color: #cc0000;">&quot;urn:http://ws.webgains.com/aws.php&quot;</span>,
        <span style="color: #cc0000;">&quot;style&quot;</span>      =<span style="color: #0000ff;">&gt;</span> SOAP_RPC,
        <span style="color: #cc0000;">&quot;use&quot;</span>        =<span style="color: #0000ff;">&gt;</span> SOAP_ENCODED,
        <span style="color: #cc0000;">'exceptions'</span> =<span style="color: #0000ff;">&gt;</span> 0
    <span style="color: #000099;">&#41;</span>
<span style="color: #000099;">&#41;</span>; </pre>
<p>An den Client k&#246;nnen dann die im <strong>Webservice</strong> angegebenen Anfragen &#252;bermittelt werden, beispielhaft hier die getEarnings-Methode, die als Parameter Start- und Enddatum, die Kampagnen-ID (diese <a href="http://www.webgains.de/affiliates/campaign.html">Kampagnen-ID findet man hier</a>) und die Logindaten erwartet:</p>
<pre style="background-color: #f3f3f3; border: 1px solid silver; padding: 6px; white-space: pre-wrap;"><span style="color: #ff9900;">// configuration</span>
<span style="color: #0000FF;">define</span> <span style="color: #000099;">&#40;</span><span style="color: #cc0000;">'LOGIN_MAIL'</span>,     <span style="color: #cc0000;">'test@test.de'</span><span style="color: #000099;">&#41;</span>;
<span style="color: #0000FF;">define</span> <span style="color: #000099;">&#40;</span><span style="color: #cc0000;">'LOGIN_PASSWORD'</span>, <span style="color: #cc0000;">'passwort'</span><span style="color: #000099;">&#41;</span>;
<span style="color: #0000FF;">define</span> <span style="color: #000099;">&#40;</span><span style="color: #cc0000;">'CAMPAIGNID'</span>,     12345<span style="color: #000099;">&#41;</span>;
&nbsp;
<span style="color: #000;">$dateStart</span> = <span style="color: #0000FF;">date</span><span style="color: #000099;">&#40;</span><span style="color: #cc0000;">'Y-m-d'</span>, <span style="color: #0000FF;">time</span><span style="color: #000099;">&#40;</span><span style="color: #000099;">&#41;</span><span style="color: #0000ff;">-</span><span style="color: #ff0000;">7</span><span style="color: #0000ff;">*</span><span style="color: #ff0000;">86400</span><span style="color: #000099;">&#41;</span><span style="color: #0000ff;">.</span><span style="color: #cc0000;">' 00:00:00'</span>;
<span style="color: #000;">$dateEnd</span>   = <span style="color: #0000FF;">date</span><span style="color: #000099;">&#40;</span><span style="color: #cc0000;">'Y-m-d H:i:s'</span><span style="color: #000099;">&#41;</span>;
&nbsp;
&nbsp;
<span style="color: #ff9900;">// send earnings request</span>
&nbsp;
<span style="color: #000;">$earningsResult</span> = <span style="color: #000;">$webgainsClient</span><span style="color: #0000ff;">-&gt;</span><span style="color: #000;">getEarnings</span><span style="color: #000099;">&#40;</span><span style="color: #000;">$dateStart</span>, <span style="color: #000;">$dateEnd</span>, CAMPAIGNID, LOGIN_MAIL, LOGIN_PASSWORD<span style="color: #000099;">&#41;</span>;</pre>
<p>Durch das Ergebnis des Aufrufs kann dann iteriert und auf die Eigenschaften jedes Datensatzes (hier <span style="font-weight: bold;">$item->commission</span>) zugegriffen werden:</p>
<pre style="background-color: #f3f3f3; border: 1px solid silver; padding: 6px; white-space: pre-wrap;"><span style="color: #006600;">if</span> <span style="color: #000099;">&#40;</span><span style="color: #0000FF;">is_soap_fault</span><span style="color: #000099;">&#40;</span><span style="color: #000;">$earningsResult</span><span style="color: #000099;">&#41;</span><span style="color: #000099;">&#41;</span> <span style="color: #000099;">&#123;</span>
   <span style="color: #ff9900;">// error handling</span>
<span style="color: #000099;">&#125;</span> <span style="color: #006600;">else</span> <span style="color: #000099;">&#123;</span>
    <span style="color: #006600;">foreach</span> <span style="color: #000099;">&#40;</span><span style="color: #000;">$earningsResult</span> <span style="color: #006600;">as</span> <span style="color: #000;">$item</span><span style="color: #000099;">&#41;</span> <span style="color: #000099;">&#123;</span>
        <span style="color: #0000FF;">echo</span> <span style="color: #cc0000;">&quot;&lt;br /&gt;&quot;</span><span style="color: #0000ff;">.</span><span style="color: #000;">$item</span><span style="color: #0000ff;">-&gt;</span><span style="color: #000;">commission</span>;
    <span style="color: #000099;">&#125;</span>
<span style="color: #000099;">&#125;</span></pre>
<p>Nat&#252;rlich k&#246;nnen pro Scriptaufruf auch mehrere Anfragen an den <strong>Webgains</strong> Webservice gestellt werden. Eine m&#246;gliche Verwendung f&#252;r den Service k&#246;nnte etwa ein RSS-Feed sein, der bei neuen Provisionen Bescheid gibt, oder ein Affiliate-Dashboard, auf dem die Zahlen mehrerer Netzwerke zusammen dargestellt werden.</p>
<p>Referenzen:</p>
<ul>
<li>Webgains: <a href="http://www.webgains.de">http://www.webgains.de</a></li>
<li>Webservice-URL: <a href="http://ws.webgains.com/aws.php">http://ws.webgains.com/aws.php</a></li>
<li>PHP SOAP-Client: <a href="http://php.net/manual/de/book.soap.php">http://php.net/manual/de/book.soap.php</a></li>
</ul>
<p>Gesamtes Script:</p>
<pre style="background-color: #f3f3f3; border: 1px solid silver; padding: 6px; white-space: pre-wrap;">&nbsp;
<span style="color: #ff9900;">// configuration</span>
<span style="color: #0000FF;">define</span> <span style="color: #000099;">&#40;</span><span style="color: #cc0000;">'LOGIN_MAIL'</span>,     <span style="color: #cc0000;">'test@test.de'</span><span style="color: #000099;">&#41;</span>;
<span style="color: #0000FF;">define</span> <span style="color: #000099;">&#40;</span><span style="color: #cc0000;">'LOGIN_PASSWORD'</span>, <span style="color: #cc0000;">'passwort'</span><span style="color: #000099;">&#41;</span>;
<span style="color: #0000FF;">define</span> <span style="color: #000099;">&#40;</span><span style="color: #cc0000;">'CAMPAIGNID'</span>,     12345<span style="color: #000099;">&#41;</span>;
&nbsp;
<span style="color: #000;">$dateStart</span> = <span style="color: #0000FF;">date</span><span style="color: #000099;">&#40;</span><span style="color: #cc0000;">'Y-m-d'</span>, <span style="color: #0000FF;">time</span><span style="color: #000099;">&#40;</span><span style="color: #000099;">&#41;</span><span style="color: #0000ff;">-</span><span style="color: #ff0000;">7</span><span style="color: #0000ff;">*</span><span style="color: #ff0000;">86400</span><span style="color: #000099;">&#41;</span><span style="color: #0000ff;">.</span><span style="color: #cc0000;">' 00:00:00'</span>;
<span style="color: #000;">$dateEnd</span>   = <span style="color: #0000FF;">date</span><span style="color: #000099;">&#40;</span><span style="color: #cc0000;">'Y-m-d H:i:s'</span><span style="color: #000099;">&#41;</span>;
&nbsp;
<span style="color: #ff9900;">// create a new soap client</span>
<span style="color: #000;">$webgainsClient</span> = <span style="color: #006600;">new</span> SoapClient <span style="color: #000099;">&#40;</span>
    <span style="color: #552200;">NULL</span>,
    <span style="color: #0000FF;">array</span> <span style="color: #000099;">&#40;</span>
        <span style="color: #cc0000;">&quot;location&quot;</span>   =<span style="color: #0000ff;">&gt;</span> <span style="color: #cc0000;">&quot;http://ws.webgains.com/aws.php&quot;</span>,
        <span style="color: #cc0000;">&quot;uri&quot;</span>        =<span style="color: #0000ff;">&gt;</span> <span style="color: #cc0000;">&quot;urn:http://ws.webgains.com/aws.php&quot;</span>,
        <span style="color: #cc0000;">&quot;style&quot;</span>      =<span style="color: #0000ff;">&gt;</span> SOAP_RPC,
        <span style="color: #cc0000;">&quot;use&quot;</span>        =<span style="color: #0000ff;">&gt;</span> SOAP_ENCODED,
        <span style="color: #cc0000;">'exceptions'</span> =<span style="color: #0000ff;">&gt;</span> 0
    <span style="color: #000099;">&#41;</span>
<span style="color: #000099;">&#41;</span>;
&nbsp;
<span style="color: #ff9900;">// send earnings request</span>
&nbsp;
<span style="color: #000;">$earningsResult</span> = <span style="color: #000;">$webgainsClient</span><span style="color: #0000ff;">-&gt;</span><span style="color: #000;">getEarnings</span><span style="color: #000099;">&#40;</span><span style="color: #000;">$dateStart</span>, <span style="color: #000;">$dateEnd</span>, CAMPAIGNID, LOGIN_MAIL, LOGIN_PASSWORD<span style="color: #000099;">&#41;</span>;
&nbsp;
<span style="color: #006600;">if</span> <span style="color: #000099;">&#40;</span><span style="color: #0000FF;">is_soap_fault</span><span style="color: #000099;">&#40;</span><span style="color: #000;">$earningsResult</span><span style="color: #000099;">&#41;</span><span style="color: #000099;">&#41;</span> <span style="color: #000099;">&#123;</span>
   <span style="color: #ff9900;">// error handling</span>
<span style="color: #000099;">&#125;</span> <span style="color: #006600;">else</span> <span style="color: #000099;">&#123;</span>
    <span style="color: #006600;">foreach</span> <span style="color: #000099;">&#40;</span><span style="color: #000;">$earningsResult</span> <span style="color: #006600;">as</span> <span style="color: #000;">$item</span><span style="color: #000099;">&#41;</span> <span style="color: #000099;">&#123;</span>
         <span style="color: #0000FF;">echo</span> <span style="color: #cc0000;">&quot;&lt;br /&gt;&quot;</span><span style="color: #0000ff;">.</span><span style="color: #000;">$item</span><span style="color: #0000ff;">-&gt;</span><span style="color: #000;">commission</span>;
    <span style="color: #000099;">&#125;</span>
<span style="color: #000099;">&#125;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sandkasten-seo.de/2010/03/06/der-webgains-webservice-ein-beispiel-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
