How we handle GDPR article 17 requests using Google Tag Manager and email?

FYI: Also try our GDPR Delete tool

We needed an easy way to delete users from our Google Analytics Free to comply with GDPR article 17 and we wanted it to be as easy as possible.

We succeeded and decided to make it easy for you as well – and yes it is free, but we would appreciate it if you helped us spread the word.

Here is what we did and what you should do!

So! we wanted to spend as little time as possible doing the implementing as we have very little time and many things to do.

The solution has 4 steps:

Step 1 – provide the user with easy access to their clientId

Step 2 – make it easy for the user to send us their clientId

Step 3 – delete the user’s data with this tool

To do this we needed 2 things.

  1. To read the clientId while the user is on our site.
  2. Write out the clientID to the user, so he/she can copy/paste it to us.

We decided that Google Tag Manager (GTM) was a good tool for this.

Part 1: Reserve a spot on the website for the clientId

We decided that the user should click on some text to reveal the clientId. So we added this HTML to our page.

<p>Your Client Id on this page is: <i id=”clientId”>[CLICK TO REVEAL]</i></p>

Part 2: Monitor clicks on “clientId” element then write the clientId

In GTM, create a trigger and call it e.g. “Get-Set clientID”


Configure to Click ID, equals, clientId

Click Save

In GTM, create a new Tag of the type Custom HTML

Paste following code:

(function(){(function(){ function getClientIdCookie(name) {  var value = "; " + document.cookie; var parts = value.split("; " + name + "=");  if (parts.length == 2) return parts.pop().split(";").shift(); } var clickedElement = document.getElementById("{{Click ID}}"); var _ga = getClientIdCookie("_ga"); if(!!_ga) {   var parts = _ga.split(".").reverse();   if(parts.length > 2)   clickedElement.innerHTML = parts[1] + '.' + parts[0]; })()

Add the trigger we created above


Click Save. Click Submit. Click Publish

Load the page where you added the HTML text. This is how the result looks on our site.


When the user clicks the [CLICK HERE TO REVEAL] text is looks like


See for yourself here.

We would love ideas and feedback. Let us know on Twitter,  or via the chat on our main site.

Validating your SCITYLANA implementation

When I test a SCITYLANA implementation for one of our customers I start out by checking the front page of the site in question and investigate what is sent to Google Analytics.

I expect to find a custom dimension with a special SCITYLANA value set. We say it’s tagged with SCITYLANA. In this post I will describe how I would check the implementation on (our own site)

I know we are using custom dimension index 1 (cd1) for the SCITYLANA tag (you can find your index in either your data extraction config or in the GA Admin). So I expect to find a hit sent to GA with a URL parameter containg a structure like

cd1: sl=1u=...&t=...

The … is just representing some value that we don’t care about in this context. So please ignore it for now.

To investigate I will use Google Chrome. So I open up Chrome at

I press F12 and get access to the Developer Toolbar. The toolbar consist of multiple tabs. One called Network, which i’ll select.

Chrome network collect

I write in the filter.

I click on the first request/hit in the list. And scroll down to the bottom on the right hand side. I get this view…

Chrome Network hit details

Now I see the line marked in yellow where I can see the the SCITYLANA tag is set in custom dimension 1 (cd1)

Now I will check the second hit sent to GA the same way.

Next: Test special events

We have scroll tracking enabled on our site so I would need to ensure that the hit sent on scrolling past a section on the page is also tagged with the SCITYLANA custom dimension value.

Chrome Network scroll hit details

After scrolling past a section on the page the site sent another GA hit. And I can see that the hit has the SCITYLANA tag set.

But what if the SCITYLANA tag wasn’t set?

You can implement the SCITYLANA tag primarily in 2 ways

GTM (Universal Analytics tags)

You need to ensure that ALL your Universal Analytics tags has the SCITYLANA custom dimension set.

SCITYLANA GA tracking plugin

You need to identify all the Universal Analytics tracking scripts you have on your site. Maybe you have multiple “master” templates each having a copy of the Universal Analytics tracking script. Make sure the SCITYLANA GA tracking plugin is in place in all templates.

Maybe your site is hosted on different platforms. A blog on wordpress and support on Zendesk etc. Add the SCITYLANA GA tracking plugin code everywhere.

If you are in need of help, shout out to us at or write a comment.