I have multiple Piwik sites sending visitors to a single/common conversion page on another Piwik site. I would like to trigger a goal for only the Piwik site which has previously tracked the visitor. Is this possible? Is there a way to tell Piwik not to trigger a goal for a Piwik site if that visitor did not previously visit the site?
Currently I have the following tracking code installed on the conversion page. Obviously with this configuration a goal is triggered for Piwik sites 1 and 4 regardless of whether or not the visitor had been to these sites…
Does anyone have an idea about this. It seems that many users would need this ability. I have a Google convertion tracking code on the same page but they only trigger a conversion if they sent the customer; it’s a fairly basic concept.
Thanks
I have an online education course. I have three websites serving as storefronts for the course. Each website gets traffic from different sources such as natural searches and PPC advertising. Each website has a ‘Start Now’ button with takes the student to a single registration/payment page. All three storefront websites funnel students to this same registration page. When the student buys the course they are sent to a page where I trigger a goal (only one conversion page for all three sites). The problem is, a goal is triggered for all three sites regardless of which site the studednt came from. So I end up with three conversions (one for each site that has a javascript tracking/goal trigger) when I really only had one. Is there a way to trigger the goal only on the Piwik site that previously ‘saw’ the student and sent them to the registration page?
In other words, instead of blindly triggering goals for every Piwik site on the conversion page, can Piwik isolate the refering Piwik site to credit goals for only that site. I do not want to trigger a goal on a Piwik site that has not tracked the visitor prior to the trigger. In this way I will be able to clearly see the conversion rate for each site even though they all funnel to the same conversion page.
Then, in the registration page, user the $_GET[‘piwiksiteid’] to set the id of the website you are tracking the goal for
<?php
$piwiksiteid = $_GET['piwiksiteid']; ?>
then from your code above
....
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", <?php echo $piwiksiteid; ?>); // here you output the id
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
piwikTracker.trackGoal(1);
} ....