About Google Analytics Ecommerce Tracking
Applies to: ONTRAPORT Plus and above.
ONTRAPORT can send purchase information from order forms to the Thank You page to record the sales information in Google Analytics Ecommerce Tracking. All ONTRAPORT Order Forms contain an advanced setting to send the information, but an additional script is needed to capture and format it for Google Analytics. Third party applications may include this ability.
Here is what you need to get started:
Configuring Google Analytics
- Set up Ecommerce Tracking in Google Analytics using the "Tracking setup (web)" section. Copy and paste the Google Analytics ID number for use in the script later.
- Configure Google Analytics for your currency. It defaults to USD / US Dollars. You need to use a recognized currency code for the script, so if you are using a different currency take note of the currency code that Google uses at the bottom of that page. Here are the currency codes used in ONTRAPORT that will work for Google Analytics:
- USD / US Dollars
- AUD / Australian Dollars
- BRL / Brazilian Real
- CAD / Canadian Dollars
- CZK / Czech Koruna
- DKK / Danish Krone
- EUR / Euro
- GBP / British Pound Sterling
- HKD / Hong Kong Dollars
- HUF / Hungarian Forint
- ILS / Israeli New Sheqel
- JPY / Japanese Yen
- MYR / Malaysian Ringgit
- MXN / Mexican Peso
- NZD / New Zealand Dollars
- NOK / Norwegian Krone
- PHP / Philippine Peso
- PLN / Polish Zloty
- RON / Romanian New Leu
- SGD / Singapore Dollar
- SEK / Swedish Krona
- CHF / Swiss Franc
- TWD / Taiwan New Dollar
- THB / Thai Baht
- Edit the View Settings in Google Analytics.
Configuring the Order Form and Thank You Page in ONTRAPORT
- Edit the Order Form. Go to the Form Settings. In the Advanced section check the Send Google Ecommerce Tracking Parameters to Landing/Thank you page checkbox. Save the order form.
Each submission after making this change will have the Google Ecommerce Tracking Parameters sent to the Thank You page. You do not have to re-embed the form on your webpage.
- If you are not using a third party program that parses the information you can use the ONTRAPORT sample script. Obtain the script from GitHub by copying the "minified version" to a text file.
- Edit the Google Analytics ID number at the top of the script to your Google ID (obtained in the Configuring Google Analytics section above).
- Edit the Google Analytics Currency code if you are not using USD. These values are shown in yellow in the image below.
- Copy and paste the edited script in the header section of your order form's Thank You page. For an ONTRApage, click the Settings icon and insert the code into Custom header code in the Custom Code section.
- Save and publish the Thank You page.
- Test the script. Note that data is aggregated into Google Analytics after 24 hours. This delay in reporting is not within our control.