<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Tracking search terms for adword campaign</title>
        <description> Hi,

I'm currently setting up Piwik but I have a problem getting the data I need about my adword campaigns:

I am aware that I can manually set up campaigns and that I can dynamically insert the keyword which has been clicked by using {keyword}.

The problem is: I don't need the keyword but the actual search term. Let's say I would have booked &amp;quot;piwik&amp;quot; with broad match in adwords and someone is looking for &amp;quot;piwik demo&amp;quot;. My ad will be shown due to broad match but instead of telling me in Piwik that the user originally searched for &amp;quot;piwik demo&amp;quot; I will just get the keyword information - &amp;quot;piwik&amp;quot;.

So instead of getting the Google valuetracker information about the keyword I would need to analyse the referrer just as it's done for organic traffic but still connect this to a campaign I have set up manually (just as the dev team intends to do completely automatically with #517) to differentiate organic and paid search terms.

Any suggestions to enable this?

Thanks a lot,
Sascha</description>
        <link>http://forum.piwik.org/read.php?2,79853,79853#msg-79853</link>
        <lastBuildDate>Sat, 18 May 2013 23:30:46 +0200</lastBuildDate>
        <generator>Phorum 5.2.18</generator>
        <item>
            <guid>http://forum.piwik.org/read.php?2,79853,98304#msg-98304</guid>
            <title>Re: Tracking search terms for adword campaign</title>
            <link>http://forum.piwik.org/read.php?2,79853,98304#msg-98304</link>
            <description><![CDATA[ I've updated the ticket and increased priority in order to commit this change : [<a href="http://dev.piwik.org/trac/ticket/517" target="_blank"  rel="nofollow">dev.piwik.org</a>]]]></description>
            <dc:creator>matt</dc:creator>
            <category>Piwik General Questions</category>
            <pubDate>Fri, 14 Dec 2012 09:41:21 +0100</pubDate>
        </item>
        <item>
            <guid>http://forum.piwik.org/read.php?2,79853,94152#msg-94152</guid>
            <title>Re: Tracking search terms for adword campaign</title>
            <link>http://forum.piwik.org/read.php?2,79853,94152#msg-94152</link>
            <description><![CDATA[ Hi wiljo,<br />
Any hope to get this as a documented patch on the tracker, so it could be in piwik anytime soon ?<br />
<br />
Has been almost a year since last activity ;)<br />
<br />
Best regards,]]></description>
            <dc:creator>beat</dc:creator>
            <category>Piwik General Questions</category>
            <pubDate>Sun, 23 Sep 2012 00:04:29 +0200</pubDate>
        </item>
        <item>
            <guid>http://forum.piwik.org/read.php?2,79853,82060#msg-82060</guid>
            <title>Re: Tracking search terms for adword campaign</title>
            <link>http://forum.piwik.org/read.php?2,79853,82060#msg-82060</link>
            <description><![CDATA[ no probs - i'll get on it :) (it's murry's patch btw)]]></description>
            <dc:creator>wilko</dc:creator>
            <category>Piwik General Questions</category>
            <pubDate>Wed, 19 Oct 2011 11:06:35 +0200</pubDate>
        </item>
        <item>
            <guid>http://forum.piwik.org/read.php?2,79853,82058#msg-82058</guid>
            <title>Re: Tracking search terms for adword campaign</title>
            <link>http://forum.piwik.org/read.php?2,79853,82058#msg-82058</link>
            <description><![CDATA[ wilko, I would like to fix the ticket. IT would really help if you were able to post a comment on the ticket, explaining what your patch does, how to test it (example adwords URLs, etc.), what exact problem it fixes (ie. does it fix all problems mentionned in the ticket?), and commit a patch as explained in: [<a href="http://piwik.org/participate/development-process/#toc-how-to-submit-a-patch" target="_blank"  rel="nofollow">piwik.org</a>]<br />
<br />
Then I promise I will commit it asap :)]]></description>
            <dc:creator>matt</dc:creator>
            <category>Piwik General Questions</category>
            <pubDate>Wed, 19 Oct 2011 11:04:31 +0200</pubDate>
        </item>
        <item>
            <guid>http://forum.piwik.org/read.php?2,79853,82056#msg-82056</guid>
            <title>Re: Tracking search terms for adword campaign</title>
            <link>http://forum.piwik.org/read.php?2,79853,82056#msg-82056</link>
            <description><![CDATA[ Hi murry,<br />
<br />
Any luck with a plugin? I've changed the core file and it is working well but like you would be more comfortable with a plugin (plus don't want to have to remember to change it again on update) :P<br />
<br />
I'm looking into plugin development now but if you've already started, I don't want to duplicate your work...<br />
<br />
Matt, what are the chances of this patch making it into the next release (and of piwik distinguishing between adwords referred traffic and normal search traffic, even when campaign parameters also exist in the querystring)?<br />
<br />
Cheers,<br />
Wilko]]></description>
            <dc:creator>wilko</dc:creator>
            <category>Piwik General Questions</category>
            <pubDate>Wed, 19 Oct 2011 10:54:20 +0200</pubDate>
        </item>
        <item>
            <guid>http://forum.piwik.org/read.php?2,79853,81647#msg-81647</guid>
            <title>Re: Tracking search terms for adword campaign</title>
            <link>http://forum.piwik.org/read.php?2,79853,81647#msg-81647</link>
            <description><![CDATA[ Murry, thanks for the patch. I cross linked it from the related ticket about better campaign tracking: [<a href="http://dev.piwik.org/trac/ticket/517#comment:20" target="_blank"  rel="nofollow">dev.piwik.org</a>]<br />
<br />
You are probably on a very good track. if you can, please read the ticket and post your patch there if it's the solution (or partial) to the problem and solutions exposed there? cheers]]></description>
            <dc:creator>matt</dc:creator>
            <category>Piwik General Questions</category>
            <pubDate>Sat, 08 Oct 2011 07:41:11 +0200</pubDate>
        </item>
        <item>
            <guid>http://forum.piwik.org/read.php?2,79853,81590#msg-81590</guid>
            <title>Re: Tracking search terms for adword campaign</title>
            <link>http://forum.piwik.org/read.php?2,79853,81590#msg-81590</link>
            <description><![CDATA[ Beware however that this is a change to a core file. <br />
<br />
It would probably be better to make a plugin, but I haven't had the time to figure out yet how those work yet.]]></description>
            <dc:creator>murry</dc:creator>
            <category>Piwik General Questions</category>
            <pubDate>Wed, 05 Oct 2011 14:15:59 +0200</pubDate>
        </item>
        <item>
            <guid>http://forum.piwik.org/read.php?2,79853,81588#msg-81588</guid>
            <title>Re: Tracking search terms for adword campaign</title>
            <link>http://forum.piwik.org/read.php?2,79853,81588#msg-81588</link>
            <description><![CDATA[ Hi murry,<br />
<br />
thanks a lot - this could solve my problem!<br />
<br />
Regards,<br />
Sascha]]></description>
            <dc:creator>Sascha</dc:creator>
            <category>Piwik General Questions</category>
            <pubDate>Wed, 05 Oct 2011 13:30:10 +0200</pubDate>
        </item>
        <item>
            <guid>http://forum.piwik.org/read.php?2,79853,81585#msg-81585</guid>
            <title>Re: Tracking search terms for adword campaign</title>
            <link>http://forum.piwik.org/read.php?2,79853,81585#msg-81585</link>
            <description><![CDATA[ I had the same problem and implemented a quick and dirty fix. Now if the campaign keywords are empty, piwik analyzes the referer url and uses the original search strings from the referer as campaign keywords.<br />
<br />
In &quot;core/Tracker/Visit.php&quot; I changed the function &quot;detectRefererCampaign&quot; in class &quot;Piwik_Tracker_Visit_Referer&quot; to this:<br />
<br />
<pre class="bbcode">
protected function detectRefererCampaign()
	{
		if(isset($this-&gt;currentUrlParse['query']))
		{
			$campaignParameters = Piwik_Common::getCampaignParameters();

			$campaignNames = $campaignParameters[0];
			foreach($campaignNames as $campaignNameParameter)
			{
				$campaignName = Piwik_Common::getParameterFromQueryString($this-&gt;currentUrlParse['query'], $campaignNameParameter);
				if( !empty($campaignName))
				{
					break;
				}
			}

			if(!empty($campaignName))
			{
				$this-&gt;typeRefererAnalyzed = Piwik_Common::REFERER_TYPE_CAMPAIGN;
				$this-&gt;nameRefererAnalyzed = $campaignName;
				$campaignKeywords = $campaignParameters[1];

				$i = 0; //mychanges
				$num_elements = count($campaignKeywords);//mychanges
				foreach($campaignKeywords as $campaignKeywordParameter)
				{
					$i++;
					$campaignKeyword = Piwik_Common::getParameterFromQueryString($this-&gt;currentUrlParse['query'], $campaignKeywordParameter);
					if( !empty($campaignKeyword))
					{
						$this-&gt;keywordRefererAnalyzed = $campaignKeyword;
						break;
					}
					elseif ($i == $num_elements) {//mychanges
						$searchEngineInformation = Piwik_Common::extractSearchEngineInformationFromUrl($this-&gt;refererUrl);//mychanges
						Piwik_PostEvent('Tracker.detectRefererSearchEngine', $searchEngineInformation, $this-&gt;refererUrl);//mychanges
						if($searchEngineInformation !== false){//mychanges
								$this-&gt;keywordRefererAnalyzed = $searchEngineInformation['keywords'];//mychanges
								break;//mychanges
						}//mychanges
					}//mychanges
				}

				return true;
			}
		}
		return false;
	}</pre>
<br />
It seems to do what I want - however I haven't used Piwik for long and am not that familiar with the source code, so there might be some side effects I am not aware of.]]></description>
            <dc:creator>murry</dc:creator>
            <category>Piwik General Questions</category>
            <pubDate>Wed, 05 Oct 2011 12:44:52 +0200</pubDate>
        </item>
        <item>
            <guid>http://forum.piwik.org/read.php?2,79853,79947#msg-79947</guid>
            <title>Re: Tracking search terms for adword campaign</title>
            <link>http://forum.piwik.org/read.php?2,79853,79947#msg-79947</link>
            <description><![CDATA[ As far as I can tell Google only forwards the booked keyword which might be a broad match term but not the search term which actually caused the ad to appear.<br />
<br />
The only way to get the search term is by analysing the referrer. What's really strange is that Piwik can actually analyse this information. In that case however all search terms are put together with organic search terms. To differentiate organic from paid search I have to set up a campaign. As soon as I do this the referrer information seems to be discarded.]]></description>
            <dc:creator>Sascha</dc:creator>
            <category>Piwik General Questions</category>
            <pubDate>Mon, 01 Aug 2011 13:34:14 +0200</pubDate>
        </item>
        <item>
            <guid>http://forum.piwik.org/read.php?2,79853,79902#msg-79902</guid>
            <title>Re: Tracking search terms for adword campaign</title>
            <link>http://forum.piwik.org/read.php?2,79853,79902#msg-79902</link>
            <description><![CDATA[ Maybe there is an adwords special {tag} for the keyword you are looking for?]]></description>
            <dc:creator>matt</dc:creator>
            <category>Piwik General Questions</category>
            <pubDate>Sat, 30 Jul 2011 16:18:59 +0200</pubDate>
        </item>
        <item>
            <guid>http://forum.piwik.org/read.php?2,79853,79853#msg-79853</guid>
            <title>Tracking search terms for adword campaign</title>
            <link>http://forum.piwik.org/read.php?2,79853,79853#msg-79853</link>
            <description><![CDATA[ Hi,<br />
<br />
I'm currently setting up Piwik but I have a problem getting the data I need about my adword campaigns:<br />
<br />
I am aware that I can manually set up campaigns and that I can dynamically insert the keyword which has been clicked by using {keyword}.<br />
<br />
The problem is: I don't need the keyword but the actual search term. Let's say I would have booked &quot;piwik&quot; with broad match in adwords and someone is looking for &quot;piwik demo&quot;. My ad will be shown due to broad match but instead of telling me in Piwik that the user originally searched for &quot;piwik demo&quot; I will just get the keyword information - &quot;piwik&quot;.<br />
<br />
So instead of getting the Google valuetracker information about the keyword I would need to analyse the referrer just as it's done for organic traffic but still connect this to a campaign I have set up manually (just as the dev team intends to do completely automatically with #517) to differentiate organic and paid search terms.<br />
<br />
Any suggestions to enable this?<br />
<br />
Thanks a lot,<br />
Sascha]]></description>
            <dc:creator>Sascha</dc:creator>
            <category>Piwik General Questions</category>
            <pubDate>Thu, 28 Jul 2011 14:28:41 +0200</pubDate>
        </item>
    </channel>
</rss>
