Skip to main content

How to set up tracking without a shop

Send orders or leads straight from your website with one tracking event. For lead generation sites and custom checkouts that have no shop system Admetrics can connect to.

What you get

  • Orders or leads from your website in Admetrics, attributed to your ad campaigns like the orders of a connected shop.

  • No shop system and no order data upload needed. One tracking event per conversion carries all the data.

  • Each event becomes an order with line items and a customer. Leads are stored the same way, their value counts as revenue.

This setup fits lead generation websites (forms, demo requests, sign-ups) and custom checkouts without an order data delivery. If you can deliver full order data, use How to connect a custom shop instead. It adds refunds, taxes, discounts and shipping costs.

Prerequisites

  • An Admetrics account set up for tracking without a shop connection. Write to your Customer Success Manager or to [email protected]. We set up the account and send you your shop ID.

  • Tell us whether you track orders, leads or both, and the event names you plan to use.

  • Access to the code of your website, or a developer who adds the snippets.

Setup steps

Step 1: Add the tracking script to all pages

Add this snippet to every page of your website, between the <body> and </body> tags. Replace [SHOP_ID] with the shop ID you received.

<script id="js-app-admq-data" type="application/json">
{
"sid": "[SHOP_ID]"
}
</script>
<script id="js-app-admq-script"
async
type="application/javascript"
src="https://shopify.admetrics.events/conversion-v1.min.js"
></script>

The script records page views and the traffic source of every visit. This is what links a later order or lead to the ad that brought the visitor.

  • The script loads from shopify.admetrics.events for every website, also when you do not use Shopify. This is correct.

  • Add the snippet to your external landing pages and advertorials too. Without it, the click IDs of your ads are lost. See Attributes for landing pages.

Step 2: Send an event for each order or lead

On the page where the conversion happens, push one event into the admDataLayer. This is the order confirmation page, the thank you page or the moment a form is sent. Send the event once per conversion. A reload of the thank you page must not send it again.

Lead event. Every field marked Optional can be left out.

window.admDataLayer = window.admDataLayer || [];
window.admDataLayer.push({
type: 'lead', // Required: 'order' or 'lead'
name: 'Lead form demo request', // Required: event name, e.g. the form
data: {
customer: { // Optional
email: '[email protected]', // Optional: plain or hashed
phone: '+4913131313123', // Optional
first_name: 'Max', // Optional
last_name: 'Mustermann', // Optional
company: 'Test Company|https://www.xyz.com' // Optional: company|website
},
revenue: 130.00 // Required: value of the lead
}
});

Order event. Use type: 'order' and add the order ID and the items if you have them.

window.admDataLayer = window.admDataLayer || [];
window.admDataLayer.push({
type: 'order', // Required: 'order' or 'lead'
name: 'Order completed', // Required: event name
data: {
customer: { // Optional
id: 'C-1029', // Optional: your own customer ID
email: '[email protected]', // Optional: plain or hashed
phone: '+4913131313123', // Optional
first_name: 'Max', // Optional
last_name: 'Mustermann' // Optional
},
order_id: 'A-2941', // Optional: generated if missing
currency: 'EUR', // Optional: shop currency if missing
revenue: 129.90, // Required: gross order value
items: [ // Optional
{ sku: 'CLSH101-0014', name: 'Product A', quantity: 1, unit_price: 129.90, unit_cost: 41.00 }
]
}
});

Fields of the event

Field

Required

What it does

type

Yes

order or lead.

name

Yes

A readable name, for example the name of the form.

data.revenue

Yes

Gross value of the order or lead, as a number, not as text.

data.order_id

No

Your own order or lead ID. If it is missing, Admetrics creates one.

data.currency

No

ISO code, for example EUR. If it is missing, your shop currency is used.

data.customer

No

id, email, phone, first_name, last_name, company. The email can be plain or hashed. If no customer is sent, the visitor ID of the tracking script is used.

data.items

No

One entry per product with sku, name, quantity, unit_price, unit_cost. If it is missing, Admetrics creates one item with the event name and the full revenue.

To send a website with the customer, add it to company after a pipe: 'Test Company|https://www.xyz.com'.

Important: Numbers go in as numbers (129.90), not in quotes. This is different from custom events, where every value is text.

Check the connection

  1. Place a test order or send a test form.

  2. Open the developer console of your browser on the confirmation page and check that the event was sent without an error.

  3. Tell us the time of the test. We confirm that the event arrived.

Orders and leads show in your reports after the next data update.

Common errors

Symptom

Cause

Fix

Orders or leads are counted twice

The event fires again on a reload or a second render of the thank you page

Send the event only once per conversion and send your own order_id

Orders or leads land in Direct

The tracking script is missing on the landing page the ad points to

Add the script to every page, including external landing pages

No orders or leads arrive

revenue is missing or the shop ID is wrong

Check the event in the developer console and the sid in the script

Related

Did this answer your question?