This document discusses using R to help document a website's Google Tag Manager setup for a DPO. It describes cleaning up unused tags, documenting tags, triggers, and variables using R, and automating the documentation process by having R pull information from GTM and add prewritten descriptions to a Markdown report. This provides documentation for the DPO while cleaning up the tag setup. Code and a working example are provided to demonstrate how to reproduce the documentation process using R and Markdown.
9. T h e r e a r e m u l t i p l e n e t w o r k c a l l s o n e a c h
w e b p a g e s e n d i n g d a t a t o m u l t i p l e t h i r d p a r t i e s
10. • DPO’s have no idea of what the
marketeers are doing
• The marketeers have no idea of
what the tools they are using are
sharing with third party
applications
• The developers have no idea of
what the marketeers added into
Google Tag Manager
THE CLIENTS ARE
LITTERALY ASKING FOR IT
12. In terms of documentation - Simos
visualization didn’t quite cut it
13. Spring cleaning
And documenting the setup
WHAT EFFORTS DID WE DO?
Setting up Conditions
Fromboth the datalayerand
cookies
Automating it
To createa quck setup fornew
clients
37. Using this as a trigger exception
Users Developers GoogleTagManagerstaticvariable
GA Variable killswitch OFF
ALL
Serverside datavariable killswitch OFF
38. How it is done
1.
Firethis tag when
3.
Astaticvariablein
gtmis set tooff
2.
Permissions are
granted
3.
Thedevelopers
havea datalayer
variableset tooff
42. How can it be build?
Pullgtmsetupand
visualizeit
Ifthedatacontainsmarketing
tags,pushtheprewritten
documentationintoatable
FormatitwithMarkdownand
behappywithyouralmost
prebuildGDPRreportforthe
DPO
43. TagswithinGTM
thatsendsnetwork
requests
Responsibl
e/User
Description
andusage
Networ
kcalls
Permission
typeand
storage
AdForm Mediaagency1 Targetedadsxyz Adnxs.com,
xyz.com
Cookie
Facebook Company Targetedadsxyz Facebook.co
m,
akamai.net
Cookie
HotJar Mediaagency2 Videorecordings
ofusersto
internaluser
testing
Akamai.net,
hotjar.com
Cookie
Sleeknote External
consultancy
Smart
subscription
bannersand
personalization
Sleeknote.c
om,xyz.com
CRM
Addthis Someonenamed
John
Weirdbuttons
thattoomany
peopleuses
Addthisserv
er.com
NONE
GoogleAnalytics Nobodyknows! Somethingwith
datathatstill
havecollected
waytoomany
thingsIshould
careabout
Googleanaly
tics.com
Cookie
GTM GDPR Framework
By having most of the work
written already, we can
simply say that ”If there is
any tags called facebook, then
add the facebook part to the
documentation”.
44. MAKING THE MOST OF IT
WITH AUTOMATION
1. Pull down GTM info with R
2. If any tags matches known
marketing tags add a
prebuid tag description to
the markdown document
3. Produce, send and make the
DPO happy
45. It is a ”Two birds, one stone” way of
doing it
Y o u g e t t o c l e a n
u p t h e o l d s e t u p
Y o u m a k e t h e D P O
H a p p y , a n d y o u r
w o r k d o c u m e n t e d
48. Presshere togogetthe R
code for downloading
information fromGTM
Presshere togogetthe R
Markdown code for
visualizingthe
information
Presshere tosee
everything written in R
Markdown
https://github.com/dannymawani/repository/blob/mast
er/Google Tag Manager Documentation Data
https://github.com/dannymawani/repository/blob/mast
er/Rmarkdownmc18
http://rpubs.com/dmoimpact/measurecamp2018