Implementing bluebarry's conversion tracking script
This guide will show you how to track your conversions and send purchase data to bluebarry, making sure all your conversions are properly visualized in bluebarry’s dashboard.
Jump to a topic 👇🏻
Step 1: Gather your credentials
You’ll need two pieces of information: your Tenant ID and your API Key.
1. Find your Tenant ID:
- Go to “Integrations” in your bluebarry account
- Look for your Tenant ID at the top of the page
- Click on it to copy
💡 Click on your Tenant ID to copy it automatically
2. Find your API Key:
- Go to “Integrations” in your bluebarry account
- Click on “add API key” and give it a name (e.g. “Conversion tracking”)
- For conversion tracking it’s not necessary to check the “Admin API key” box.
- Copy your API Key
Step 2: Add the Tracking Script
💡 If you’re unsure how to add a script to the <head> element of your page’s HTML or how to retrieve the purchase properties from your eCommerce platform, consult your web development agency.
Add this script to the <head> section of the page where your purchases are registered. This is often a confirmation page that users are redirected to after payment.
Step 3: Customize the tracking values
Replace the placeholder values with your actual order data:
- “TOTAL ORDER”: The total amount of the purchase
- “CURRENCY”: Your currency code (e.g., “EUR”)
- “ORDER ID”: A unique identifier for the order
In the items array, add an entry for each purchased product: - “PRODUCT ID”: The product’s unique identifier
- “QUANTITY”: How many were purchased
- “PRICE PER ITEM”: The price per item
Make sure to also replace TENANT_ID_HERE and API_KEY_HERE with your actual credentials.
💡 Again, if you’re unsure how to retrieve tracking values from your eCommerce platform, make sure to consult your web developer.
After following the steps above, you are now able to see the conversions, purchases and purchase values in your bluebarry dashboard.
Important Notes
- Add this script only to the page that is registering the purchase events.
- The script must run after the order details are available
- Test the implementation with a test purchase to ensure proper tracking