How To Setup Google Analytics Cross Domain Tracking With Salsa Labs Engage & CRM

TL;DR At Three Ventures we have many clients who are 503c non-profit organizations. While each client is different in their mission and digital needs, one thing is consistent, lots of you use Salsa Labs for fundraising software.

Alan morte
President & Co-Founder
Let's Talk
Name 
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Contact form success icon

Thank you for getting in touch!

We will get back to you as soon as possible
(usually within one work day).

If you use Salsa Labs engage / CRM and Google Analytics, you’ll probably notice that your conversion attribution is incorrect in Google Analytics. Most conversions get dumped into a self-referral. You may have tried to set up the referral exclusion list, but now all your traffic gets dumped into direct traffic.

If this is you, there is 100% a cross-domain tracking problem. This blog post is about how to address this very issue with Google Tag Manager.

Step One: What Causes A Self-referral With Salsa Labs

self-referrals google analytics salsa labs

What causes the issue is when a user goes from one domain to another. The first domain is your non-profit domain. The second domain is your SalsaLabs.org subdomain. There are usually two cases when this happens:

  • The user leaves your site domain to go to a page on your-subdomain.SalsaLabs.org.
  • The user leaves your SalsaLabs.org subdomain and goes back to your main site domain.

What causes the self-referral in both cases is the Google Analytics cookie not linking up across each domain. If the cookie doesn’t link, each site assigns their own cookie which has a different clientID value.

If the clientID is different for each site is different, the following happens:

  1. Two separate users are recorded (one from each site)
    1. Two separate sessions are recorded (one for each user on each site)

Solution: tell Google Analytics that this user is actually the same across both sites.

How To Link The ClientID Across Both Domains With Google Analytics

There are two ways to link the clientId across domains with Google Analytics. They are

  1. Use the linker plugin from Google
  2. Create your own linker script

The linker plugin from Google is misleading. This is because Google says it will do the cross domain tracking for you by adding the clientID to cross domain links. That’s a partial truth - it only applies to links which are static and hardcoded in the HTML of your site. This means any time you use a form to send a user across your main site domain and your subdomain of SalsaLabs.org, the linker plugin won’t work. This is when you need to develop your own linker script.

Here are the two main cases with Salsa Labs when you will need your own linker script:

  1. Your main domain uses a form (or dynamic link) to send a user to your subdomain of SalsaLabs.org
  2. Your Salsa Labs subdomain uses a form to send a user back to your main domain

Google Analytics Cross Domain Linker Script For Salsa Labs

We developed a custom cross domain linker script for you to use with Salsa Labs. This script does the following:

  1. Gets the clientID from the Google Analytics cookie
  2. Writes the value to a hidden form field in your forms

The script we wrote works in the following cases:

  • You have one Google Analytics tracker on the page
  • You have only one hidden form fields in your Salsa Labs forms

If you don’t meet the cases above:

  • Multiple Google Analytics trackers (EX: one for a rollup and one for your main site) - you will need to contact us for some hourly consulting to help you complete this.
  • More than one hidden form field - you will need to contact us for some hourly consulting to help you complete this.

To get the script, email us.

Updating Your Salsa Labs Forms To Work With Cross Domain Tracking

After you get the script, you will need to make some configuration changes. First, you will make changes to your Salsa Labs forms. The changes are:

Configure forms salsa labs
  1. Create a form field, mark it as hidden.
    1. Name the form gacid
  2. Add the hidden form field to a test form
  3. Check the option to pass form field values via a parameter on redirect to thank you page
Redirect for salsa labs cross domain with google analytics

Next up, you’ll need to configure Google Tag Manager

Cross Domain Tracking Setup With Google Tag Manager & Salsa Labs Forms

At this point you should have the custom linker script and you’ve set up a Salsa Labs form for a test. Now we need to set up Google Tag Manager to:

  1. Execute the custom linker script
  2. Record the clientID passed through the form with the Google Analytics pageview

Executing the custom linker script:

  • Add a “Custom HTML” tag
  • Name it “HTML - ThreeVentures.com - Cross Domain Linker”
  • Paste the code into the tag
  • Add a trigger
    • Note: you should only fire this when a Salsa Labs form exists on the page.

Record the clientID passed through the form with the Google Analytics pageview

  1. Create a new variable
    1. Type: URL
    2. Component Type: Query
    3. Query Key: scf_gacid
    4. Name: “URL - Query - scf_gacid”
google tag manager variable for salsalabs cross domain google analytics
  1. Create a new trigger
    1. Type: pageview
    2. Some pageviews
      1. Referrer contains “SalsaLabs.org”
      2. Name: Pageview - All Referrals From Salsa Labs
google tag manager trigger for salsalabs cross domain google analytics
  1. Copy your current Google Analytics pageview tag
    1. Rename it - “UA - Pageview - From Salsa Labs Forms”
    2. Select “Enable overriding settings in this tag”
    3. Open “more settings”
    4. Open “fields to set”
    5. Add a field
      1. Field name: clientId
      2. Value: {{URL - Query - scf_gacid}}
    6. Add a trigger
      1. Pageview - All Referrals From Salsa Labs
google tag manager tag for salsalabs cross domain google analytics
  1. Go back to your original Google Analytics pageview tag
    1. Add the following trigger as an exception
      1. Pageview - All Referrals From Salsa Labs
google tag manager exemption trigger for salsalabs cross domain google analytics
  1. Preview
    1. Confirm in the debug tool that when you submit a form, that on the thank you page the following happens:
      1. The redirect URL contains a parameter “scf_gacid”
      2. The value for that parameter is written as the clientId in the tag
        1. UA - Pageview - Main - From Salsa Labs Forms
    2. Follow along in real time in Google Analytics to confirm the form submission is correctly attributed to the source you visited the site from.
      1. Make sure you visit the site organically, not direct, to ensure everything is working properly.

Having troubles with Google Tag Manager? Contact us for some hourly consulting help.

Wrapping Up Cross Domain Tracking With Salsa Labs Engage/CRM & Google Analytics

This post should work flawlessly for most of you. If your install is more complex, or you’re struggling, don’t hesitate to reach out. There are cases where you will need expert help. These cases are:

  1. If you don’t use Google Tag Manager
  2. You use multiple hidden form fields with your forms
  3. You don’t redirect the user when they submit a form
  4. Your tag manager container is overly complex, and or you need help

For each case about a block of hourly consulting will help address your needs. This includes a senior analytics consultant and developer support if needed. Our entire team is here to help you and your nonprofit's mission one line of analytics code at a time!

About the author

Alan morte

Alan Morte

President & Co-Founder

Alan is the President at Three Ventures. One of the founding partners in 2012, he leads the company and how it continually evolves to help clients accelerate, increase, & optimize their business with data.

See other posts from Alan Chat with the author on LinkedIn

Contact Us

Our Clients Turn Customer Data Into Dollars.