Check if a visitor is on a Mobile Device or not with GTM

Create a new Custom JavaScript variabele. This variable returns true or false.

isMobile

Thanks to Stackoverflow.com.

 

To check if a pageview is made on a mobile device we could use this trigger:

Trigger - isMobile

To check if our variable isMobile is equals true we could determine our vistor is on a mobile device or not. This trigger is usefull to fire tags or preventing tags from firing.

In this example our tag is fired on each page except when a user is on a mobile device (when isMobile variable is true).

isMobile2

 

 

Was it interesting? Share it, so someone else can read this too!Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

3 thoughts on “Check if a visitor is on a Mobile Device or not with GTM”

Leave a Reply

Your email address will not be published. Required fields are marked *