You are here

Google Analytics Events

description

Send event Tags to Google Analytics with their built in :

  • eventCategory
  • eventAction
  • eventLabel
  • eventValue

If 3 variables are not enough for you... santianoEvent comes with two optional and very usefull variables : 

  • eventSegment
  • eventPartition

To set them up, just edit the custom dimensions in your Google Analytics and match them with customDimension Numbers in you gaConfigEvent variable

setup

Please refer to the container setup instructions

gtm tags

gaEvent

gaEvent
Tag Type : Universal Analytics - Google Analytics
Event Tag For Google Analytics based on santianoEvent :

  Track Type : Event
Category : {{eventCategory}}
Action : {{eventAction}}
Label : {{eventLabel}}
Value : {{eventValue}}
Non-Interaction Hit : True (Always as I love the intended definition of the Bounce Rate)
Google Analytics Settings : {{gaConfigEvent}}

close

gtm triggers

Event - santianoEvent - All

Event - santianoEvent - All
Trigger Type : Custom Event
For all events named santianoEvent
This trigger fires on : All Custom Events

close

gtm variables

eventAction

eventAction
Variable Type : Data Layer Variable
The eventAction seet by santianoEvent and santianoEcommerce to be used by a variety of vendors

  Data Layer Variable Name : eventAction
Data Layer Version : Version 2
close
eventCategory

eventCategory
Variable Type : Data Layer Variable
The eventCategory sent by santianoEvent and santianoEcommerce to be used by a variety of vendors

  Data Layer Variable Name : eventCategory
Data Layer Version : Version 2
close
eventCommand

eventCommand
Variable Type : Data Layer Variable
santiano.io comes with its specific eventCommand : its naming scheme facilitates management and maintenance of events tags and ecommerce tags.

  Data Layer Variable Name  : eventCommand 
Data Layer Version : Version 2
close
eventLabel

eventLabel
Variable Type : Data Layer Variable
The eventLabel sent by santianoEvent and santianoEcommerce to be used by a variety of vendors

  Data Layer Variable Name : Label
Data Layer Version : Version 2
close
eventPartition

eventPartition
Variable Type : Data Layer Variable
The event Pasent by santianoEvent and santianoEcommerce to be used by a variety of vendors

  Data Layer Variable Name : eventPartition
Data Layer Version : Version 2
close
eventSegment

eventSegment
Variable Type : Data Layer Variable
The eventSegment sent by santianoEvent and santianoEcommerce to be used by a variety of vendors

  Data Layer Variable Name : eventSegment
Data Layer Version : Version 2
close
eventValue

eventValue
Variable Type : Data Layer Variable
The eventAction sent by santianoEvent and santianoEcommerce to be used by a variety of vendors

  Data Layer Variable Name : eventValue
Data Layer Version : Version 2
close
gaConfigEvent

gaConfigEvent
Variable Type : Google Analytics Settings
Google Analytics Configuration variable for all events being sent and based on gaProperty

  Tracking ID : {{gaProperty}}
Cookie Domain : auto
Custom Dimensions : 'To configured with the right event custom dimension you want to send'
Index -> DimensionValue
101 -> {{eventSegment}}
102 -> {{eventPartition}}
close
gaProperty

gaProperty
Variable Type : Custom Javascript
Dynamic Google Analytics Variable for the individual UA property

  function() {
    var pageHostName = {{pageHostName}};
    var santianoCoreWebsiteIsInProduction = {{santianoCoreWebsiteIsInProduction}};
    var gaUaDev = {{gaUaDev}};
    var gaUaProd = {{gaUaProd}};
    if (santianoCoreWebsiteIsInProduction) {
      	// We are on the Production environment
    	return gaUaProd;
    } else {
      	// We are on Development environment
       return gaUaDev;
    };
}
close
gaUaDev

gaUaDev
Variable Type : Constant
The Google Analytics UA code for your Dev Environment

  Value  : Replace with your Dev UA-XXXXX
close
gaUaProd

gaUaProd
Variable Type : Constant
The production UA property ID needed to be called on your production website

  Value : Replace with your Prod UA-XXXXX
close
pageHostName

pageHostName
Variable Type : URL
Providing the hostname of the page being loaded to the user

  Component Type : Host Name
close
pageParameterUtmCampaign

pageParameterUtmCampaign
Variable Type : URL
The url Parameter utm_campaign used by Google Analytics

  Component Type : Query
Query Key : utm_campaign
close
pageParameterUtmContent

pageParameterUtmContent
Variable Type : URL
The value of the Url parameter utm_content used by Google Analytics

  Component Type : Query
Query Key : utm_content

close
pageParameterUtmMedium

pageParameterUtmMedium
Variable Type : URL
The value of the url parameter utm_medium used by Google Analytics

  Component Type : Query
Query key : utm_medium

close
pageParameterUtmSource

pageParameterUtmSource
Variable Type : URL
the url parameter utm_source used by Google Analytics

  Component Type : Query
Query Key : utm_source
close
pageParameterUtmTerm

pageParameterUtmTerm
Variable Type : URL
the url parameter utm_term used by Google Analytics

  Component Type : Query
Query Key : utm_term
close
santianoApacheV2.0Licence

santianoApacheV2.0Licence
Variable Type : Custom Javascript

    function() {
  // santiano.io is released under Apache V2.0 licence.
  // 
  // Copyright 2018 Santiano Consulting SAS (santiano.io)
  // 
  // Licensed under the Apache License, Version 2.0 (the "License");
  // you may not use this file except in compliance with the License.
  // You may obtain a copy of the License at
  // 
  // http://www.apache.org/licenses/LICENSE-2.0
  // 
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
    return 'santiano.io is released under Apache V2.0 licence';
  }
close
santianoCoreAuthorizedDomainNamesList

santianoCoreAuthorizedDomainNamesList
Variable Type : Custom Javascript
Provides a JS array of all production domain names expected to be tracked

  function() {
  // Replace with the list of all Production Domain Names for your own setup
  // remember to include all the domains with their appropriate subdomain
  var santianoCoreAuthorizedDomainNamesList = ['santiano.io', 
                                               'garylemasson.com', 
                                               'www.garylemasson.com', 
                                               'analytics.google.com', 
                                               'tagmanager.google.com'];
  return santianoCoreAuthorizedDomainNamesList;
}

close
santianoCoreWebsiteIsInProduction

santianoCoreWebsiteIsInProduction
Variable Type : Custom Javascript
Grabs santianoCoreAuthorizedDomainNamesList and pageHostName and returns true if we are in Production

  function() {
  var pageHostName = {{pageHostName}};
  var santianoCoreAuthorizedDomainNamesList = {{santianoCoreAuthorizedDomainNamesList}};
  if (santianoCoreAuthorizedDomainNamesList.includes(pageHostName) ) {
    return true
  } else {
    return false
  };
}
close

Download