Adwords and Piwik visits doesn't match

I’m using PIWIK about 2 months now, and it works just fine, but now I’m stuck with this:

I launched a campaign in adwords for one of my client’s website, and I attached campaign and keyword ID tags for the landing URL to be able to collect data in PIWIK about the CPC campaign.

The URLs are like this:


My problem is, that my Adwords campaign shows about 20% higher click numbers, than Piwik displays for adwords campaign visits on the site. Unfortunatelly I can’t find the source of this. I checked the Entry pages datas in Piwik (the landing pages are couldn’t be accessible anywhere else, only from the Adwords campaign) and the visits showed for entry-s are equal with the pk_campaign=adwords datas in Piwik/Referrers/Campaigns.

Any idea what could cause such difference?

Thank You in advance!

Have you disabled DoNotTrack in the settings?

Dear Matt,

I checked my Settings/Privacy tab, but I only see this :

Piwik opt-out for your visitors

Piwik is dedicated to providing privacy on the Internet. To provide your visitors with the choice of opting-out of Piwik Web Analytics, you can add the following HTML code on one of your website page, for example in a Privacy Policy page.

This code will display an Iframe containing a link for your visitors to opt-out of Piwik by setting an opt-out cookie in their browsers. Click here to view the content that will be displayed by the iFrame.

I can’t find the DoNotTrack option, does it mean that my user is not a superuser?

You need to login as super user

Dear Matt,

I have disabled DoNotTrack in the settings as superuser, but I’m still stuck with this problem:

Adwords campaign shows about 30% higher click numbers, than Piwik displays for adwords campaign visits on the site.

All my Google ads are created with campaign and keyword ID tags for the landing URL to be able to collect data in PIWIK:
The target URLs (in the ads) are like this:

Do you have any idea how is it possible, that the Google Adwords and Piwik shows so different click numbers? Is there any method to check weather the Piwik script working all the time at the landing pages?

Thank You for Your help!

The most accurate way to check whether piwik tracks all your campaign URLS, would be to check in the access logs for requests containing pk_campaign and check the number of such visits. Are there the same as what Piwik reports?

1 Like

Are you using JavaScript to track visits? If so, there are a bunch of ways a visitor will not show up in Piwik:
[li] JS is not available/installed (likely true for bots)
[/li][li] JS is disabled
[/li][li] User hits the back button before the page (and JS) fully loads
I’m sure there are other causes, but you get the point.

Unfortonatelly, the difference is more than 15% between the two calculations (PIWIK and Adwords) and I don’t think that the disabled JS could cause such difference alone.

I thought it will be easier, if I could compare my own server log and PIWIK’s server log (so I could easily spot the missing URL-s). Could You please tell me, how could I export the PIWIK server’s log (not the user log, but the log that contains all visited URL-s with time stamps).

Thank You for Your help!

You’re not the first to see a big gap… see in particular:,81615,82036

As you can see, the poster who raised the original issue was able to identify all of the visitors using PHP. This suggests that something about JS (either on the client or in the Piwik script) is the cause of the missing data. The poster believed that many of the users are “bouncing” before loading the full page and JS. I’ll bet that at least some of them are international spammers-for-hire who have disabled JS to make it harder to track them.

If possible, I suggest that you create a second website on your Piwik instance and populate it using your web server (via a client library, PHP or otherwise). That should both identify all of the users (closely matching AdWords)… and give you insight into the missing users (e.g. IP address).

@sulczgabor - Looking at the pages you linked, you have the piwik script listed at the top of the body, but tagged with ‘defer’, which means that it would load after all other scripts, images, etc. When I first loaded your page, mootools.js and a few other assets took around 10 seconds total to load and the load time of the page overall was very high. A lot of that can be on account of my location (US - west coast) in relation to your servers, but that still seems unusually high.

Make sure when you test your page, you are clearing cache - unique visitors driven from paid marketing are not going to have your assets cached. When you test, neither should you.

Most users will get bored after the first couple seconds if they can’t interact with your page and they’ll leave - since you’ve defered the execution of the piwik code until the very end ( in my visit to your page - more than 15 seconds after my initial request ) that visit wont be tracked. I suspect thats your largest issue with the discrepancy in this case.

This is not a problem with Piwik - but can be a hurdle with any tracking relying solely on a javascript solution. Implementation really matters.

The company I work for has since rolled our own internal analytics - and we still experience these types of issues and have again leveraged both server side and client side tracking to offset it. Though the server tracking code allows us better accuracy in relation to the ad platforms - we are always actively trying to reduce the discrepancy between server side and client side tracking. That is mostly through standard best practices and optimization of content.

Typically the issues I’ve encountered range from third party scripts delaying execution, visitors far from our edge locations causing high load times, mobile traffic - especially on a bad connection and with unsually long load times and lastly, bots.

I would remove the ‘defer’ off the piwik.js script to give that more importance and test with that script in the head and the tracking code also in the head right below it. If that more or less solves the discrepancy, you can start testing by moving the scripts around and combining and minifying for better optimization.

Sorry for the wall of text - but hope that helps.