Skip to content

Naming conventions and setup guidelines for Purdue University, Polytechnic Institute

License

Notifications You must be signed in to change notification settings

techpurdue/GTM-Documentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

GTM Documentation

Example container, naming conventions and setup guidelines for Purdue University, Polytechnic Institute

Example Container

The file "initial_pu-ppi_tracking.json" is an example container that includes the following initial tags and triggers:

PU GA page views PPI GA page views and events to match previous GA embed codes.

  • downloads
  • mailto link clicks
  • webform submissions
  • outbound link clicks

It is customized to match the default Drupal Google Analytics module settings to track events. It also includes auto tracking of submitted forms as events. This is based on the "Webform" module structure with unique form IDs. To use the file, make sure you do the following:

  1. import it into your workspace (Admin > Import Container)
  2. change the "ppi ga account" variable value and name to match your GA tracking ID number
  3. change the trigger and tag names to reflect your GA account property
  4. change the outbound link trigger to exclude your domain
  5. preview and validate events and pageviews are being tracked as expected in your GA realtime reports

Naming Conventions

Capital vs lowercase names

Use lower case to identify custom tags and variables you create. Reserve Case for pre-defined tags and variables. This allows us to quickly determine who made what, and will help identify where problems may have originated from.

Tags, Triggers and Variables

Include the site the tag is for, the GA account data is being sent to, and the track type or actual event.

Example tags for sending pageviews to two GA accounts and an event that sends outbound link clicks to the ppi GA account:

  • ppi ga - ppi pageview
  • pu ga - ppi pageview
  • ga event - ppi ga - outbound link click

Folders

Use folders to collect items for separate GA accounts and global variables and triggers. Example:

  • global
  • ppi
  • pu

Variables

Use constant variables when available. This will reduce redundancy and help keep multiple GA accounts separate.

Example variables for defining two GA accounts:

  • ppi ga account
  • pu ga account

Data Layers

Be consistent with use of data layer variable names. Proposed naming conventions:

Event Category:

  • Webform Submission - Event Action: "Unique Form ID/Name" - Event Label: "Submission URL"
  • Outbound links - Event Action: "Click" - Event Label: "destination URL"
  • Mails - Event Action: "Click" - Event Label: "destination URL"
  • Forms - Event Action: "Click" - Event Label: "destination URL"
  • Downloads - Event Action: "Click" - Event Label: "destination URL"

Reference documentation:

About

Naming conventions and setup guidelines for Purdue University, Polytechnic Institute

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published