All Collections
Getting Started
How to use the Revenue Tracking Script (Order Tracking)
How to use the Revenue Tracking Script (Order Tracking)
Updated over a week ago

To track customer orders from Retention.com contacts on your eCommerce site, you can use our Revenue Tracking Script. This will identify the:

  1. email address

  2. order number, and

  3. transaction amount

tied to a contact from your eCommerce site. We will then pull that data and display it on your Dashboard.

TAKE NOTE that including the email variable is *necessary* for proper ROI and attribution analysis.

Where should I put it?

The revenue tracking script should only be placed on post-checkout/purchase confirmation pages, or wherever a contact lands once they have finished a transaction.

TAKE NOTE: The revenue tracking script automatically uses our suppression script. We can identify contacts with order information if they are suppressed.

What do I need to use it?

From your eCommerce platform, you will need the following variables:
​ORDER EMAIL : **This variable is imperative for proper ROI Analysis and attribution.**
​ORDER NUMBER: Attaches the customer's order/transaction number
​ORDER AMOUNT: Passes the total amount of the order.

Where do I find it, and how do I set it up?

1. From your Retention Dashboard, click Code Script. Then, click View Your Script. Check the box next to Revenue Tracking. Then, click Copy Code and paste it into your post-purchase thank you or confirmation page(s).

You will need to get the variables for the order number, order amount, and order email from your eCommerce site. Then, replace ORDER_NUMBER, DOLLAR VALUE, and ORDER EMAIL in the script with those variables, then place it on your post opt-in or checkout confirmation page(s).*

*Note that our placeholders contain double brackets:

##{{ order_number }} 

If you are not using Shopify or you are using system where those brackets are not part of the templating language, remove the brackets. They are part of the variable placeholder used in Shopify and specific to this example.

Depending on what those variables look like, the updated version of the script might look something like this:

Okay, I've added the script! Now what?

Once the revenue tracking script is added, we will start to capture order information for your Retention.com contacts that land on these pages.

Once data is collected, your dashboard will display your Reclaim revenue (if using Reclaim), Grow Revenue & ROI, and the number of Grow Contacts collected. You can view the data by the Last 30 Days, Month Over Month, Quarter, and Year. Click View More next to any of these sections to see the contact information, event, details, dates, and other information.

How to add revenue tracking to your site

View tutorials for the e-commerce site you use to see how to add the revenue tracking script:

Did this answer your question?