Skip to main content

Analytics Quickstart

This guide provides a pre-configured Google Tag Manager (GTM) template to help you quickly set up tracking for your Spektrix integration. By importing this template, you can automatically configure Google Analytics 4 (GA4) and Meta Pixel tracking (including standard pageviews, purchases, and specific item tracking) without needing to manually create every tag and trigger.

Prerequisites

Before you begin, ensure you have the following:

  • A Google Tag Manager Account: If you do not have one, follow Google's documentation to create an account and a container.
  • Google Analytics 4 Measurement ID: This starts with G- (e.g., G-A1B2C3D4E5).
  • Meta Pixel ID: Your unique pixel ID from Meta Business Manager.
  • Spektrix System Currency: The 3-letter currency code for your system (e.g., GBP, USD, CAD).
  • (Optional) Spektrix Event ID: If you wish to track conversions for a specific event.

Step 1: Download the Template

Download the pre-configured GTM template file below:

Download GTM-Template.json

Step 2: Import the Container

  1. Log in to your Google Tag Manager account.
  2. Navigate to the Admin tab (top left).
  3. Under the Container column, click Import Container.
  4. Click Choose container file and select the GTM-Template.json file you downloaded in Step 1.
  5. Choose your workspace (you can use the Default Workspace or create a new one).
  6. Select an import option:
    • Overwrite: Select this only if you are starting with a brand new, empty container. This will delete any existing tags.
    • Merge: Select this if you already have tags in your container. Choose Rename conflicting tags, triggers, and variables to ensure nothing is accidentally deleted.
  7. Click Confirm.

Step 3: Configure Variables

The template uses placeholder variables that you must update with your specific IDs.

  1. In your GTM Workspace, click Variables in the left-hand menu.
  2. Scroll down to the User-Defined Variables section.
  3. Find and edit the following variables by clicking on them and replacing the placeholder text with your actual values:
Variable NameDescriptionAction
Spektrix System CurrencyThe currency code for your transactions.Replace ENTER AUD, CAD, USD, OR GBP HERE with your code (e.g., GBP).
Google Analytics 4 IDYour GA4 Measurement ID.Replace ENTER GA4 ID HERE with your ID (e.g., G-12345678).
Meta Pixel IDYour Meta Pixel ID.Replace ENTER META PIXEL ID HERE with your numeric Pixel ID.
Spektrix Item ID for Meta PixelOptional. Used to track purchases for a specific event only.Replace ITEM ID GOES HERE with the formatted Item ID (see below).

Formatting the Spektrix Item ID (Optional)

If you are using the specific item tracking feature, you must format the ID correctly for the trigger to work.

  • Event Tickets: T[EventID]I (e.g., if your Event ID is 12345, enter T12345I)
  • Merchandise: M[ItemID]- (e.g., M200-)
  • Donations: D[ItemID], (e.g., D7808,)

For more help determining these IDs, you can refer to the instructions in our Meta Pixel documentation.

Step 4: Add Container to Spektrix

Once your container is configured, you need to add the GTM installation code to your Spektrix iframes.

  1. In GTM, click your Container ID (formatted as GTM-XXXXXX) in the top navigation bar.
  2. You will see two snippets of code.
  3. Log in to your Spektrix System and navigate to Website Admin > Domain Specific Config.
  4. Select the domain you are working on (and repeat for Default if necessary).
  5. Header Code: Copy the top code snippet from GTM (starting with <script>) and paste it into the Specify HTML Headers field in Spektrix.
    • Note: In the code, remove https: from the source URL in the code to avoid protocol errors. For example, you will need to change https://www.googletagmanager.com... to //www.googletagmanager.com...
  6. Body Code: Copy the bottom code snippet from GTM (starting with <noscript>) and paste it into the Specify HTML Immediately After The Opening Body Tag field in Spektrix.
  7. Click Save.

For more details on adding the container to Spektrix, you can refer to the instructions in our Google Tag Manager documentation

Step 5: Publish and Test

  1. In Google Tag Manager, click the Submit button in the top right corner.
  2. Give your version a name (e.g., "Initial Spektrix Setup") and click Publish.
  3. To verify everything is working, use the Tag Assistant Companion extension to simulate a transaction on your website and ensure tags are firing correctly. Note that using the Preview button in GTM does not work well with testing iframes, so our recommendation is using the Tag Assistant Companion.
Advanced Customization

This template includes a basic setup for general tracking purposes as well as one specific Item for Meta Pixel. However, if you need to track multiple different Items or Events with different Pixels, you may need to duplicate the specific item Tags and Triggers. Please refer to the full Meta Pixel guide for detailed instructions on manual configuration.