LocalMed Support LocalMed Support

  • Knowledge Base
  • FAQs
Home / Implementation / Google Affiliate Tracking

Google Affiliate Tracking

THIS ARTICLE IS OUTDATED.

Please click the link below for updated instructions:
https://www.notion.so/localmed/Cross-Domain-Tracking-with-Google-Analytics-39feed9b004648639c0cd66b123cd502

The goal is to ensure we track your original traffic source to your website as the source for pageviews and events on localmed.com. Normally, once a user transfers from your website to localmed.com, a new session is created and your website is treated as the traffic source.

For more information: Cross-domain Tracking Documentation on Google

Step 1: Setup Auto-linking for localmed.com

Cross-domain tracking works by sharing a unique client ID between a source domain and a destination domain. This is a two step process:

  1. The source domain needs to ensure all URLs pointing to the destination domain contain the client ID of the source domain.
  2. The destination domain needs to know to check for the presence of a client ID in the URL once a user navigates there.

The linker plugin accomplishes this by adding a linker parameter to URLs that point to the destination domain. The linker parameter contains the client ID as well as the current timestamp and browser metadata encoded within it. The timestamp and metadata are used to avoid problems with URL sharing.

Add auto-linking for localmed.com by using the linker plugin. Here’s an example snippet:

ga('create', 'UA-XXXXXXXX-X', 'auto');
ga('send', 'pageview');
ga('require', 'linker');
ga('linker:autoLink', ['localmed.com']);

Form more details:  Linker Plugin Documentation on Google

If you’re using Google Tag Manager, follow the steps in this article.

Step 2: Add a Referral Exclusion for localmed.com

Referral traffic is the segment of traffic that arrives on your website through another source, like through a link on another domain. Analytics automatically recognizes where traffic was immediately before arriving on your site, and displays the domain names of these sites as the referral traffic sources in your reports.

Adding referral traffic sources
  1. Sign in to your Analytics account.
  2. Click Admin.
  3. In the ACCOUNT column, use the dropdown to select the Analytics account that contains the property you want to work with.
  4. In the PROPERTY column, use the dropdown to select a property.
  5. Click Tracking Info.
  6. Click Referral Exclusion List.
  7. To add a domain, click +ADD REFERRAL EXCLUSION.
  8. Enter localmed.com and your own domain
  9. Click Create to save.

For more details visit: Referral Exclusion Documentation on Google

Step 3: Setup Reporting Views and Filters

This allows you to distinguish LocalMed pages from your domain pages

By default, Analytics only includes the page path and page name, not the domains name. For example, you might see your pages appear in the Site Content report like this:

  • /about/contactUs.html
  • /about/contactUs.html
  • /products/buy.html

Because the domain names aren’t listed, it might be hard to tell which domain each page belongs to.

To get the domain names to appear in your reports you need to do two things: Create a copy of your reporting view that includes data from all your domains in it and add an advanced filter to that new view. The filter will tell Analytics to display domain names in your reports.

Follow this example to set up a view filter that displays domain names in your reports when you have cross domain tracking set up. For some fields, you need to select an item from the dropdown menu. For others, you need to input the characters here:

  • Filter Type: Custom filter > Advanced
  • Field A: Hostname Extract A: (.*)
  • Field B: Request URI Extract: (.*)
  • Output To: Request URI Constructor: $A1$B1

Click Save to create the filter.

You can validate that filters are working as you expect using Google Tag Assistant Recordings. Tag Assistant Recordings can show you exactly how your filters change your traffic.

Fore more details: Reporting Views and Filters Documentation on Google

Step 4: Create Goals for LocalMed Events

When a user submits our appointment form, we will trigger an event with the following properties:

Category: "LocalMed Appointment"
Action: "Scheduled LocalMed Appointment"
Label: [Provider Name]

Navigate to your goals:

  1. Sign in to Google Analytics.
  2. Click Admin, and navigate to the desired view.
  3. In the VIEW column, click Goals.
  4. Click + NEW GOAL
  5. Select Custom from the list of options.
  6. Click Continue
  7. Enter a goal name, i.e. “Scheduled LocalMed Appointment”
  8. Under Type select Event
  9. Click Continue
  10. Set Action equals to Scheduled LocalMed Appointment

For more details: Creating Goals Documentation on Google

Step 5: Send LocalMed your Property ID

Once you have completed the above steps, send us your Property ID for us to implement into your widgets.

Send to support@localmed.com with the Practice Name and Office Name

Email Format:

UA-XXXXXXXX-X
Practice Name
Office Name (if more than one office)
Implementation

Related Articles

  • Wix Websites
  • Instagram
  • Facebook
  • Google My Business
© LocalMed 2020