Tracking campaign with jquery get

Hello,
I´ve got an question concerning tracking campaign.

In a Mail the user click on a link
http://qr.domain.de/link/keyXYZ
This is redirected with a htacces RewriteRule to
http://www.domain.de/qrlink.php?Key=keyXYZ
This script makes two things
call via jquery $.get the url http://piwik.domain.de/piwik.php?idsite=1&pk_campaign=add&pk_kwd=MailSignature
and after that redirects via javascript to the real page http://www.domain.de/

I also tested loading to an other path like
http://www.domain.de/qrlink.php?pk_campaign=add&pk_kwd=MailSignature
(with the tracking code inside … this call is shown in my dashboard)

The campaign link is generated by piwik and similar to the old “noscript” version.

But surprise this solution works fine but without tracking the campaign.

Some idea or help?

To track campaigns use either:

  1. the URL generator http://piwik.org/docs/tracking-campaigns/url-builder/

  2. if you hit piwik.php directly (ie. the TRACKING API) then you have to use parameters _rcn and _rck http://piwik.org/docs/tracking-api/reference/

Now I can say…no kind of campaign tracking is working.

I generated a link with the tool and piwik records the visit of the page but without tracking the campaign.

In the last days I tested several conditions without success. Any idea?

Yes, see Troubleshooting - Analytics Platform - Matomo

  1. Are your pages tagged correctly? Yes. The code is there and the code is recording all page visits.

  2. Are you using a redirect on your website landing page? No. But I´m using Drupal Clear Paths linke www.domain.org/testsite?.

  3. Piwik only records 1 referer by visit, which means that only the first referer used to access the website will be recorded. >> Yes I tested the solution over days not over minutes.
    But to track campaign more detailed…it would be usefull when I can configure who to track a campaign. Every visit or only the first visit.

  4. Check that the Piwik domain name in your Javascript tracking code is correct. >> The Url is correct and the piwik code is loaded sucessfully.

I have read the FAQ before … without success.

  1. Piwik only records 1 referer by visit, which means that only the first referer used to access the website will be recorded. >> Yes I tested the solution over days not over minutes.

try with a new browser and make sure you open the campaign tagged link FIRST (ie. dont visit the website before)

The campaigns are tracked only on the first page view