Cookieless Backend Server Tracking for Google Analytics – WordPress Plugin

Description

Get rid of the cookie banner with this plugin and the correct privacy settings. And gather important insights by seeing ALL users in your tracking, and not only users without blockers. Decide with data you want to sent to google. Depending on your local laws and plugin settings you might not need a cookie banner. Make your Analytics tracking invisible for tracking/ad blockers.

BE AWARE
This plugin uses server to server tracking. On the one hand it is a big advantage, because nothing is happening in the browser of the user. On the other Hand this means: every page you want to track need to processed by PHP.
So if you have a caching plugin or cloudflare caching or similiar it won’t work, because you will only track thoses hits which really hit the server.

Plugin Features

  1. Cookieless tracking
  2. Hide all user and PII Data from Google -> get rid of cookie banner if your privacy laws allow it.
  3. Compare cookieless tracking vs. backend cookie vs. GA Library Cookie
  4. Enhanced Ecommerce Purchase Tracking intgration with woocommerce
  5. Enhanced Ecommerce checkout steps for Checkout Behaviour Analysis Report
  6. Enhanced Ecommerce purchase actions for Shopping Behaviour Analysis Report
  7. Sent Tracking hit to a custom URL, not to GA or to both.
  8. Opt out link via shortcode.
  9. Obey Do Not Track header.
  10. Use existing opt out cookie.
  11. Anonymizeip
  12. A lot of debugging options
  13. Creates an own client id.
  14. woocoommerce support, but works without woocommerce as well.

Important: Recommendation is not to mix frontend tracking data with data from this plugin. Please create a separate property or view for the tracking data from this plugin.
If you mix the data you probably will get duplicate hits.

This Plugin uses the google analytics measurement protocol to send server to server tracking requests. The Tracking is not detectable in the frontend, which means it can not be blocked by ad blocker.
This Plugin is not affected by newest ITP of Apples Safari or any other tracking/ad blocking technology. It will be only affected if no cookies are allowed to save.

Biggest advantage: Don’t send any user data to google and tracking not affected by ad blocker.
Biggest downside: with backend tracking not all data is available, so e.g. page titles and screen sizes are not available.

Use this plugin as addition to your existing frontend tracking, to see the impact of ad blockers or use it as your only tracking solution.
Recommendation is, to use it in addition to existing frontend tracking.

Cookieless tracking
To activate cookieless tracking: General > Client ID Generation > cookieless
It uses a very simple fingerprint. It is a hash from Useragent, IP and browser do not track header.
Advantage of using such a simple fingerprint is, that it is not blocked by any browser.
Disadvantage is that it is only stable as long as the IP adress is not changing. Which it does mostly every 24h.
This is still better as having a new user for each page view, which happens if the browsers block tracking cookies. With this setting you make sure to have a stable session for each user.

Cookieless tracking with Reset at midnight
It is similiar to cookieless tracking with an important differences: The User identifier is resetet everday at midnight. So you are only able to track a user during one day. If he comes back the next day he will get a new identifier.
Why should you do that? Because depending of your local laws you do not gather “user information” anymore. With this setting you might not need a consent for tracking anymore, because you do not track the user.

compare cid generator methods
Check “Advanced > Compare different cid generator methods” to compare different cid generation methods.
The following will be compared:
1. cookieless from this plugin
2. tracking cookie from this plugin
3. If available: tracking cookie generated by Google Analytics frontend library: _ga cookie. (Must have implemented Standard GA Frontend tracking)

The test data should go in a separated test property. You need to create a custom dimensions which is populated with the type of cid:
1. created by plugin
2. cookieless
3. created by GA library

If you like to share your results I am happy to hear from you.

Notes for woocommerce integration
1. gross prices are tracked.
2. product tags are tracked as brand in GA.
3. Enhanced Ecommerce is not fully implemented yet. It will evolve release by release. If you have any feature wishes please use the WP Support Forum of this Plugin.
4. For technical reasons the add to cart event is not logged to the frontend. But you see it in the logs.

Screenshots

  • Debug Log in Browser console
  • General Settings
  • Custom Dimension Settings.
  • Enhanced Ecommerce Settings.
  • Filter Settings
  • Privacy Settings.
  • Debug Screen: see if everything works as expected.
  • Advanced Settings: add your own tracking URL.

Installation

You can install this plugin without woocommerce.

Just install this plugin and go to Settings > Google Analytics Backend Tracking to add your GA property Id and activate the tracking.

Please use a property ID which is new. Do not mix requests from this plugin with request from another tracking solution in one property id.
If you want to use an existing property id you should use different views with view filters. To recognize the traffic from this plugin you can check the field “data source” for “wp-backend-tracking”.

You may want to check the privacy section, before you activate it.

Use this shortcode [nsc_gabt_opt_out_link linktext=’tracking opt out’ linktext_success=’you have opted out.’] to display an opt out link.

If you have woocommerce installed it will automatically track the orders. Do not forget to activate “enhanced ecommerce settings” in your google analytics settings.

FAQ

What settings do I need, that I do not need a user consent anymore?

First of all: Please clarify that with your Data Privacy expert and Lawyer. I can not give you legal advice.
Setting which would not send any user data would be:
1. Privacy > cookieless with reset at midnight
2. Privacy > Anonymize IP > Do not sent user ip
But please check the data in the logs and consult your data privacy expert before putting this to live.

Reviews

October 17, 2021
Guys, this plugin is perfect. Dream come true. I just set cookieless, no JavaScript Google Analytics without effort. Thank you Nikel Schubert.
April 1, 2021
It's about time that there is such a plugin. It works perfectly.
July 31, 2020
Finally after so many years... Thanks! Bravo!
June 13, 2019 2 replies
This plugin actually registers *some* data like incognito visits and brave browsers. Unfortunately it doesn't track events. I would happily pay to have that function. I'm not looking to collect personal data, but i do want to see when my ads result in some kind of conversions. Conversions you can't send to a thank you page is getting harder and harder to detect. Great work, thank you! Create a paid version with event tracking and i will be the first in line 🙂
Read all 3 reviews

Contributors & Developers

“Cookieless Backend Server Tracking for Google Analytics – WordPress Plugin” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

2.4.0

  • Critical Fix: Please update immediatly.

2.3.1

  • Bugfix: Some orders where missing in google analytics after update to 2.2

2.3.0

  • FEATURE: added cookieless option with reset at midnight to be super privacy secure.
  • FEATURE: added Filter section and filtering for known bots. Can be extended in settings area.

2.2.0

  • BREAKING CHANGE: in checkout and with purchase product id is default sku now. woocommerce product id is only submitted if sku is empty.
  • FIX: when purchased more then 1, the item price was not per item.
  • Improvement: Logging in browser console is now more accurate. Added target domain as well.

2.1.0

  • add option to prevent sending user ip to google analytics at all. Now it is possible to not sent any PII to google. Depending on your jurisdication you might not need a cookie banner then anymore. Please check your privacy laws.
  • moved setting “client id generation” to “Privacy” tab.

2.0.3

  • replaced deprecated woocommerce method: get_used_coupons.

2.0.2

  • another cookie fix.

2.0.1

  • FIXED: cookie was set, even in cookieless tracking mode.
  • FIXED: if static resources were not found, they sometimes triggered a pageview tracking.
  • REFACTOR: introduced cid manager class
  • REFACTOR: improved cookie setting timing

2.0

  • make different cid generation/storage methods comparable.

1.9

  • Added cookieless tracking
  • Added custom dimension for tracking plugin client id
  • Added feature to rename tracking cookie

1.8.2

  • Minor bug fix: opt out link showed sometimes the wrong text, if you use opt in.

1.8.1

  • Fixing major bug from v1.8: setcookies had problems with older php versions.

1.8

  • added samesite attribute for cookies: samesite=lax
  • fix minor js error in wordpress backend

1.7

  • added support for opt in

1.6.1

  • updated woocommerce support flag

1.6

  • Enhanced Ecommerce checkout steps for Checkout Behaviour Analysis Report
  • Enhanced Ecommerce purchase actions for Shopping Behaviour Analysis Report
  • bug fixes.

1.5

  • added feature to sent tracking hit to a custom URL, instead of to google or to both.
  • added product categories and product brand tracking to woocommerce purchase tracking.
  • some stability improvements and minor bug fixes.

1.4

  • added support for enhanced ecommerce woocommerce transaction tracking (more events to come).
  • added feature to log the request data in browser console for easier debugging.

1.3

  • added compatibility for snippets
  • improved bot recognition

1.2.4

  • minor improvement.

1.2.3

  • bug fix
  • opt out link has an id now, for easier styling.

1.2.2

  • bug fix

1.2.1

  • fixed a minor xss issue

1.2

  • added support for custom dimensions: you can now submit raw referrer, raw url, frontend GA client id and user agent as custom dimensions
  • field “Data source” is now submitted with value “wp-backend-tracking”. Now you can identify the source in mixed properties.
  • cache buster is added.
  • Fix: added hit type

1.1

  • Added support for Apples ITP 2.1 -> cookie is http only now.

1.0.1

  • Fixed PHP Notice for missing referrer.

1.0

  • First Version of this Plugin. More to come!