rationalizing tag management

60
Rationalizing Tag Management by Simo Ahava (NetBooster) for MeasureCamp VI ”It’s just JavaScript” – William Henry Harrison

Upload: simo-ahava

Post on 14-Jul-2015

1.011 views

Category:

Internet


0 download

TRANSCRIPT

Rationalizing Tag Management

by Simo Ahava (NetBooster)

for MeasureCamp VI

”It’s just JavaScript” – William Henry Harrison

The web is inherently stateless.

Tag Management Systems operate

in the web.

Tag Management Systems are

inherently stateless.

it’s just JavaScript

Landing Page, Session, and previous touchpoints are

terminology of a stateful machine, not the web.

Landing Page, Session, and previous touchpoints are

terminology of a stateful machine, not the web.

The web feeds messages to a backend process, which builds

the data pipeline. Not the other way around.

Solutions

- Simple response mechanism for hits to Analytics

(GA requests are unilateral today)

{"newSession":"true", "sourceMedium":"google/cpc"}

Solutions

- Authentication of TMS, and real-time data written

in dataLayer

Solutions

- Forget it. Build a proper data pipeline server-

side and let the TMS do what it’s good for (sending

raw hit data to the backend).

^^^^^^^^^^^^^^^^^^^^^^^^follow @carmenmardiros

dataLayer.

The confusing, intimidating,

developer-requiring, geek-nerdy,

ScravaJipty, structured-or-

arbitrary, perhaps-necessary,

damn-it-to-hell dataLayer.

it’s just JavaScript

It’s not generic

Native Array

GTM’s dataLayer

dataLayer != data model

{{dataLayer test}}

> undefined

dataLayer != data model

{{dataLayer test}}

> ”true”

dataLayer != data model

{{dataLayer test}}

> ”false”

dataLayer != data model

{{dataLayer test}}

> ???

dataLayer != data model

{{dataLayer test}}

> ”false”

dataLayer != data model

dataLayer is a message bus.

dataLayer != data model

dataLayer is a message bus.

The push() method is appended with a listener that

updates values in the data model as they are pushed

into the Array.

dataLayer != data model

dataLayer is a message bus.

The push() method is appended with a listener that

updates values in the data model as they are pushed

into the Array.

push() is the only method with significance. pop(),

split(), slice(), splice() etc. will not affect the

data in the data model.

dataLayer and developers

I will not demean myself to comment on this.

dataLayer and developers

I will not demean myself to comment on this.

OK, yes I will.

dataLayer and developers

I will not demean myself to comment on this.

OK, yes I will.

If you are working in digital

and you are allergic to

developer/IT cooperation, you

are in the wrong line of

business.

GTM and Google Analytics do not

have a special connection.

There is no special connection.

GTM and Google Analytics do not

have a special connection.

There is no special connection.

At the moment.

GTM and Google Analytics do not

have a special connection.

There is no special connection.

At the moment.

I’ve said too much.

it’s just JavaScript

What is Google Tag Manager

1. A JavaScript injector.

What is Google Tag Manager

1. A JavaScript injector.

Yeah... that’s it.

TMS is a marketer’s tool.

TMS is a developer’s tool.

TMS is a marketing-minded

developer’s tool.

TMS is a developer-minded

marketer’s tool.

it’s just JavaScript

Why it’s about marketing

Why it’s about marketing

1. ”Tags” collect data for marketing

attribution

Why it’s about marketing

1. ”Tags” collect data for marketing

attribution

2. Non-developers often got the code wrong

or didn’t understand variables -> TMS

was born to template the tagging process

Why it’s about marketing

1. ”Tags” collect data for marketing

attribution

2. Non-developers often got the code wrong

or didn’t understand variables -> TMS

was born to template the tagging process

3. Semantic information has been a mystery

to webmasters / developers strongly

immersed in presentational and

experiential layers (HTML+CSS+JS)

Why it’s about IT

Why it’s about IT

1. It’s a freaking JavaScript injector!

Why it’s about IT

1. It’s a freaking JavaScript injector!

2. You can add all sorts of malicious /

website-breaking / malware-infested code

with the click of a button

Why it’s about IT

1. It’s a freaking JavaScript injector!

2. You can add all sorts of malicious /

website-breaking / malware-infested code

with the click of a button

3. If When you need dataLayer, it needs to

be integrated to the systems which

expose the semantic information

Why it’s about IT

1. It’s a freaking JavaScript injector!

2. You can add all sorts of malicious /

website-breaking / malware-infested code

with the click of a button

3. If When you need dataLayer, it needs to

be integrated to the systems which

expose the semantic information

4. If something goes awry, IT will be held

responsible (as they own the processes)

Should a TMS be used to hack

around a poorly coded website?

<insert witty golf analogy that

explains why it’s not a good

idea to overcorrect faults or to

fix errors with errors>

Things you can do with a TMS

Things you can do with a TMS

pop-up dialogs

Things you can do with a TMS

pop-up dialogs

quick fixes to markup

Things you can do with a TMS

pop-up dialogs

quick fixes to markup

event.target.parentElement.parentElement.children[0].cousin[1].neighbor.dog

complex DOM traversal

Things you can do with a TMSwith a JavaScript-disabled browser

Things you can do with a TMSwith a JavaScript-disabled browser

Things you can do with a TMS

1.Proof-of-concept experiential & presentationalchanges to get buy-in from IT / HiPPO

Things you can do with a TMS

1.Proof-of-concept experiential & presentationalchanges to get buy-in from IT / HiPPO

2.Inject semantic information (JSON-LD, META tags)

Things you can do with a TMS

1.Proof-of-concept experiential & presentationalchanges to get buy-in from IT / HiPPO

2.Inject semantic information (JSON-LD, META tags)

3.Fix glaring errors in conflicting JavaScript

Things you can do with a TMS

1.Proof-of-concept experiential & presentationalchanges to get buy-in from IT / HiPPO

2.Inject semantic information (JSON-LD, META tags)

3.Fix glaring errors in conflicting JavaScript4.Load 3rd party libraries (e.g. jQuery)

asynchronously

Things you can do with a TMS

1.Proof-of-concept experiential & presentationalchanges to get buy-in from IT / HiPPO

2.Inject semantic information (JSON-LD, META tags)

3.Fix glaring errors in conflicting JavaScript4.Load 3rd party libraries (e.g. jQuery)

asynchronously5.Plus all the usual benefits (tagging,

consolidating code, arbitrary JavaScript / HTML injection, etc.)

it’s just JavaScript

Favorite JS resources

http://www.codecademy.com/en/tracks/javascript

Favorite JS resources

Nicholas Zakas – Professional JavaScript for Web Developers

Favorite JS resources

Douglas Crockford – JavaScript: The Good Parts

Favorite JS resources

Cody Lindley – DOM Enlightenment

Favorite JS resources

http://eloquentjavascript.net

Favorite JS resources

Chrome (OS X) : ⌘ + ALT + JChrome (Win) : CTRL + SHIFT + J

THANK YOU

@SimoAhava

”The awesome splendor of the universe is much easier to dealwith if you think of it as a series of small chunks.”