Add Your Google Analytics Code

Google Analytics, “allows you to track and understand your customer’s behaviour, user experience, online content, device functionality and more.”

Prerequisites

How to install the Google Analytics code

Once you have created your Google Analytics Global Site Tag, you are required to, “copy and paste this code as the first item into the <head>1 tag of every web page that you want to track.”

Within your Salesforce Org2, install Google Analytics code in the Head Content section as detailed on the Content Management page.

You may need to create a new Content Block3 using the +New Content Block option. For best practice, refer to, Adding Custom Javascript, CSS, Body and Head Content Scripts when creating a new Content Block for your <head> content.

If you are installing other tracking codes such as Facebook Pixel, you will need to add all the tracking codes into the same Content Block.

Learn more about the Content Management section of the StoreConnect Config app

 


 

  1. <head> tag: Used to contain metadata such as the title of the page, its description, and any relevant keywords. Scripts (code), links to scripts and CSS files (for page styling) may also be contained in the <head> tag. 

  2. Salesforce Org: The virtual space provided to an individual customer of Salesforce. It includes all of your data, records, etc and applications. A Salesforce Org, or “Org” for short is an abbreviation of “organisation”. 

  3. Content Block: Content Blocks are used to place content on your Pages and Articles. There are two types of Content Blocks 1) A Container Content Block, and 2) A Template Content Block. 

 

 
Back to Documentation