Marin Tracker Asynchronous Snippet Code Frequently Asked Questions


The tracking snippet code on the Revenue Tracking page (Admin > Revenue > Revenue Tracking) has been updated with the asynchronous JavaScript and UTM:I-only implementation.

New clients should use the updated asynchronous code for click and conversion capture. There are several benefits to this:

  • This implementation is non-blocking, meaning the rest of the page continues to load while the platform's click/conversion capture code executes. This was not the case with our previous click/conversion capture code.
  • Removal of the HTML <form> and <textarea> elements expands the locations where the code may be deployed. For example, in a JS library or .net form.
  • UTM:I-only enables the platform to use the Conversion Type settings page (Admin > Revenue > Conversion Types) to determine which conversion types add to totals. This means changes to which conversion types add to totals no longer requires a code deployment.

Frequently Asked Questions

Do I Need To Update The Old JS Code With The Latest Snipped Async Code?

No, the old tracking code is backwards-compatible and will continue to work. Existing clients adding new conversion types may continue to use the old code, however, new clients integrating with platform tracking should use the asynchronous code.

Is Old JS Click Capture Code Compatible With Asynchronous Conversion Capture Code?

Meaning, Will Conversions Be Attributed As Expected? Similarly, Is Asynchronous Click Capture Code Compatible With Old Conversion Capture Code?

Yes, conversions will be attributed as expected, however, this is not a recommended configuration. Clients using the old code who choose to add new conversion types should continue to use the old code, unless they choose to migrate to the asynchronous code. New clients should use asynchronous code exclusively.

Why Was The Change Made?

We did this for a number of reasons:

  1. To enable the platform's code to execute in parallel with other content on the page, and no longer block. This enables the platform's code to be deployed at the top of our client's pages without negatively impacting performance.
  2. To improve flexibility around conversion type totaling and removing client code deployment as a dependency when conversion type settings change.

The Option To Select Secured (Https://) Or Unsecured (Http://) From The Revenue Tracking Section Is No Longer Available For This New Code? Why Did This Change?

The JavaScript for the updated tracker codes automatically detects either 'https://' and 'http://'. This detection is specifically in line: var mProto = (('https:' == document.location.protocol) ? 'https://' : 'http://').This piece of code can tell if the page is secure or not, and then sets mProto accordingly.

The reason the old setup had the option to select either secure or non-secure was to update the image pixel portion of the script: " <noscript><img src="...">. However, this was not really necessary if the snippet was utilizing the JavaScript portion.

I Am Currently Using The Old Tracking Code. How Do I Switch Over To The Asynchronous Code?

You should be able to simply replace the old code with the asynchronous code. For more information on how to view the asynchronous code in the platform, please click here.

If you have any other specific questions about how this will affect your account, please reach out to your Online Marketing Manager / Client Services Manager for further training on this new implementation.

What If I Don't Want To Use Order ID And/Or Price In My Conversion Code (I Don't Need To Dynamically Populate These Placeholder Values In The Code Since I Won't Be Using It)?

If you don't need to utilize the orderId and price values in the conversion code, you can either:

  1. Remove the orderId line and price line completely.
  2. Leave the orderId line and price line in the code, but remove the values: @ORDER-ID@ and @PRICE@, in which the values would instead be two single quotes.

How Is Revenue Calculated When It Is Uploaded?

The revenue that is uploaded will generally be price x quantity. Our recommendation is to either track orders with multiple items as a single conversion (i.e. a quantity of 1) with total sales value in price, or track each item individually (i.e. set quantity to 3 and price to be the sales value for each item).

Written by Marketing @ Marin Software

Last published at: June 9th, 2023