With Bold Cashier, you can use custom tracking scripts to customize the information that gets sent to Google Analytics and Facebook Pixel. You can also integrate with other analytics and tracking services, that are not directly integrated with Cashier, to track successful purchases.
If you need some help in creating a script to add to Bold Cashier, you can reach out to Shopify Experts through StoreTasker.
To set up custom tracking scripts in Cashier, please follow these steps:
- From Shopify's admin, select Apps.
- Select Bold Cashier.
- Select Settings, then Analytics.
- Select the toggle button on "Enable custom script".
- Enter your custom script.
- Select Save.
There are a few limitations when it comes to custom tracking scripts.
- Liquid code cannot be used for variables, because the correct values will not be populated. You will need to use Bold Variables.
- There are certain types of script that won't work in the custom scripts section of Bold Cashier.
- Any script that adds anything to the checkout. Such as an image, a popup, a link, an input field.
- Any service that does heat mapping to track how your customer interacts with the checkout.
- Anything that requires Google Tag Manager, or anything that requires code being added in the <head> of the checkout.
- The custom tracking scripts only run on the Thank You Page, to track successful purchases.
Cashier has an integration with Google Tag Manager to allow you more control over your analytics.
These are some of the order parameters you can use to create your custom scripts:
- BOLD.order.id: The ID number of the customer's order, in Cashier.
- BOLD.order.currency: The currency the order was purchased in.
- BOLD.order.customer.email: The customer's email address.
- BOLD.order.billing_address.province_code: The province or state ID code (Manitoba = MB).
- BOLD.order.billing_address.country_code: The customer's country ID code (Canada = CA).
- BOLD.order.line_items.sku: The item's SKU number.
- BOLD.order.line_items.title: The product title (product name).
- BOLD.order.line_items.price: The price of the item in the lowest denomination ($39.95 = 3995).
- BOLD.order.line_items.quantity: The quantity of a purchased product.
- BOLD.order.line_items.platform_variant_id: The item's Shopify variant ID.
- BOLD.order.line_items.platform_product_id: The item's Shopify product ID.
- BOLD.order.subtotal: The order's subtotal in the lowest denomination ($39.95 = 3995).
- BOLD.order.total_shipping: The total cost of shipping.
- BOLD.order.total_tax: The total amount of taxes on the order.
- BOLD.order.total: The complete order total cost (including tax and shipping).
Our Analytics Documentation has more information about what's available in the order object.
Loading in an external script, is usually done by using script tags.
However, Cashier doesn't allow you to add script tags into the custom tracking scripts. You can use the following code to load an external script.
var script = document.createElement("script"); // create a script DOM node
script.src = url; // set its src to the provided URL
document.head.appendChild(script); // add it to the end of the head section of the page (could change 'head' to 'body' to add it to the end of the body section instead)
If you are looking to add more advanced functionality to the Bold Cashier checkout, you can take a look at our Developer Documentation, and reach out to our Partners team to get started.