Profile cover photo
Profile photo
Simo Ahava
3,108 followers -
Senior Data Advocate
Senior Data Advocate

3,108 followers
About
Simo's posts

Post has shared content
My latest article revolves around the Mixcloud player, and shows a simple way to track interactions with an embedded player widget on your site.
Tracking the Mixcloud player with Google Tag Manager

My latest article is on tracking the Mixcloud embedded player widget using Google Tag Manager and Google Analytics. You can use this combination to track events like "play", "pause", and "progress".

#gde #blogpost #googletagmanager

Post has attachment
Tracking the Mixcloud player with Google Tag Manager

My latest article is on tracking the Mixcloud embedded player widget using Google Tag Manager and Google Analytics. You can use this combination to track events like "play", "pause", and "progress".

#gde #blogpost #googletagmanager

Post has shared content
Great utility for Enhanced Ecommerce tracking via Google Tag Manager. Thanks +Eivind Savio!
New blog post - How to Split an Enhanced Ecommerce Transaction using GTM (or alternatively - How to Build a Google Tag Manager Enhanced Ecommerce Rocket)

Post has shared content
UPDATE: The article has been updated with working code. Not only was there a comma missing from the array, but the forEach() iterator was non-functional due to returning to the outer scope of the Custom JS Variable and not out of the function itself.
-
Here's a short and simple tip for Google Tag Manager. It's a simple Custom JavaScript Variable that you can leverage to combine multiple, seemingly unrelated URL strings to one pattern match check against the current URL.
#GTMTips: Test against multiple URLs in triggers

This simple tip article shows you how to create a Custom JavaScript Variable, which returns true or false, depending on if the current page URL matches a list of URL strings or not.

It's a simple way to reduce complexity in your containers, as you only need one single trigger condition instead of, for example, multiple triggers or one really long, messy Regular Expression field.

#gde #blogpost #googletagmanager

#GTMTips: Test against multiple URLs in triggers

This simple tip article shows you how to create a Custom JavaScript Variable, which returns true or false, depending on if the current page URL matches a list of URL strings or not.

It's a simple way to reduce complexity in your containers, as you only need one single trigger condition instead of, for example, multiple triggers or one really long, messy Regular Expression field.

#gde #blogpost #googletagmanager

UPDATE: I had to update the article with rewritten code. In its previous state, the article would not work.

Post has shared content
My latest article is a handy tool for leveraging CSS selectors in DOM traversal. If you have a complex document structure, and you find yourself wishing there was SOME way to access that far-away <div> relative to the link the user just clicked, well, look no further! This guide should help you build the necessary utility for capturing the element you need.
Capturing the correct element in Google Tag Manager

My latest article is about DOM (document object model) traversal in Google Tag Manager.

There are times when our page HTML is simply uncooperative, and even though we can get GTM to work without elements, we might need information on the page relative to the clicked element, but too far away to be accessed with regular means.

In this guide, we'll build a simple Custom JavaScript Variable which allows you to specify any element (e.g. {{Click Element}}), and then with a given CSS selector (e.g. 'div#topDiv'), the variable climbs up the DOM from the origin until it finds an element that matches the selector, returning it in turn.

It's a great way to access those out-of-reach DOM elements.

#gde #blogpost #googletagmanager

Post has attachment
Capturing the correct element in Google Tag Manager

My latest article is about DOM (document object model) traversal in Google Tag Manager.

There are times when our page HTML is simply uncooperative, and even though we can get GTM to work without elements, we might need information on the page relative to the clicked element, but too far away to be accessed with regular means.

In this guide, we'll build a simple Custom JavaScript Variable which allows you to specify any element (e.g. {{Click Element}}), and then with a given CSS selector (e.g. 'div#topDiv'), the variable climbs up the DOM from the origin until it finds an element that matches the selector, returning it in turn.

It's a great way to access those out-of-reach DOM elements.

#gde #blogpost #googletagmanager

Post has shared content
Here's a nice walkthrough of the Workspaces feature. You are using them, aren't you?

Post has shared content
Good stuff from +Krista Seiden on setting up Google Optimize tracking (to GA) via GTM!

Post has shared content
If you've been doing any type of software development work, or if you've worked with developers, you'll no doubt have heard about testing, or even test-driven-development and behavior-driven-development.

In this article, I want to share a solution I've written for writing functional tests for Google Tag Manager's dataLayer. It's a work-in-progress, so if you want to stay up-to-date with what's going on, I recommend following the GitHub repo actively (and contributing, if you wish!).
Automated Tests for Google Tag Manager's dataLayer

Here's what I've been working on recently. It's an open-source project for running automated (functional) tests on Google Tag Manager dataLayer on any given web location.

Basically, it's a very traditional test framework, using tools like WebdriverIO, Selenium, Mocha, Chai. I've created a JSON Schema -compliant configuration file that controls what is tested and where. Using JSON Schema lets you create very flexible rules for window.dataLayer validation.

I've also added the option to just do subset checks, if you don't want to mess with JSON schemas.

The project is open-source, and you find the repo here: https://github.com/sahava/gtm-datalayer-test/

#gde #blogpost #googletagmanager
Wait while more posts are being loaded