Conversions Tracking, but Keyword Tracking Not Working?

I finally got my conversions tracking. However, I am not able to see what keywords it is for. I have this pixel installed on a third party site. The visitor visits our site, then they click on a link, they are then taken into a form. We have our pixel placed on the form thank you page (the third party site). I’m not sure if there is a particular way this needs to be setup or what.

Here is my code below:


<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "http://mydomain.com/piwik/" : "http://mydomain.com/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackPageView();
piwikTracker.trackGoal(1); 
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script>
<!-- End Piwik Tag -->

As I mentioned our conversions are tracking. We can see the conversions appearing under Piwik. However, we just can’t see it for the individual keywords. What keyword send the conversion…

Referer tracking (Keyword/Website/campaign) is stored in a cookie and it should automatically work assuming visitors didn’t delete the cookie.

[quote=matthieu]
Referer tracking (Keyword/Website/campaign) is stored in a cookie and it should automatically work assuming visitors didn’t delete the cookie.[/quote]

I understand that, and it’s the conversions are tracking. However, they are not appearing at keyword level. I can’t tell what keywords are converting.

Apparently they are not removing any cookies. The conversions are showing. I Just can’t see them by segments such as keywords, search engines, and etc. I’m wondering if there is something wrong with my code or whatever…

Update____

By the way I just checked my stats again. It seems to be tracking by country, continent, and time zone fine. However, when I look at tracking by websites, it doesn’t list Google. Instead, all the conversions are showing up under our third party site (separate domain from where Piwik code is installed).

I’m not sure if that has something to do with the keyword conversions not showing up or what. Do you see what I’m saying?

It definitely is the reason: if the partner website is the referer, then keywords can’t be referer as well. Did you set the URL of the website properly in the Piwik admin? it should not count as referer a URL you set as primary URL or alias URL for this website

[quote=matthieu]
It definitely is the reason: if the partner website is the referer, then keywords can’t be referer as well. Did you set the URL of the website properly in the Piwik admin? it should not count as referer a URL you set as primary URL or alias URL for this website[/quote]

Yes the domain (unless I’m suppose to use a URL) is setup properly under Piwik. The only thing I can think of is that the https might be a problem in the code.


var pkBaseURL = (("https:" == document.location.protocol)

Do you think I should replace the https with http. I’m not even using https where the Piwik is installed. Other then that I’m not sure what it is, do you have any idea? I need to get this fixed, it’s important. Or maybe it’s because I left the www. out of my code?

https shouldn’t be an issue if none of the pages you track are https.

please explain exactly the setup of your Piwik: what is the goal, what URL is the tag on, what URL appears in the Conversion by Websites report, etc.

[quote=matthieu]
https shouldn’t be an issue if none of the pages you track are https.

please explain exactly the setup of your Piwik: what is the goal, what URL is the tag on, what URL appears in the Conversion by Websites report, etc.[/quote]

Your questions as addressed:

  1. Goal is manually triggered using the JavaScript API trackGoal()
  2. When you refer to tag, I assume you are talking about javascript tracking tag. The tag is installed on an outside domain (third party site). Our analytic code is installed on our website.
  3. The third party site is appearing under the website referrer report.

I see, technically Piwik is not designed to track conversions on third party website (it could work, but not implemented yet).

Did you add the third party website URL in the alias URL for the website?

actually I don’t understand what you mean by"
2. When you refer to tag, I assume you are talking about javascript tracking tag. The tag is installed on an outside domain (third party site). Our analytic code is installed on our website. "

please explain exactly your setup (what you copied on which domain, where you call trackGoals etc.)

[quote=matthieu]
actually I don’t understand what you mean by"
2. When you refer to tag, I assume you are talking about javascript tracking tag. The tag is installed on an outside domain (third party site). Our analytic code is installed on our website. "

please explain exactly your setup (what you copied on which domain, where you call trackGoals etc.)[/quote]

This code below is installed on our site:


<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://mysite.com/piwik/" : "http://mysite.com/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src="http://mysite.com/piwik/piwik.php?idsite=1" style="border:0" alt=""/></p></noscript>
<!-- End Piwik Tag -->


This code below is installed on our third party site (an outside different domain name):


<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "http://mydomain.com/piwik/" : "http://mydomain.com/piwik/"winking smiley;
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"winking smiley);
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackPageView();
piwikTracker.trackGoal(1); 
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script>
<!-- End Piwik Tag -->

And for the Alias question, no we have no setup the alias. Where do I need to go to do this?

go to Settings > Websites > Alias URL, add the third party domain. Note: it will only work for new visitors from the moment you update the list, so might take few hours/days to record new conversions with keyword. Please report if in a few days you dont see any change.