Google Tag Manager
Already using GTM? Import PixelMili's custom tag template and start sending events server-side in minutes — no JavaScript changes to your site required. Your existing GTM triggers, variables, and DataLayer setup carry over unchanged.
What you'll need
- A GTM container installed on your website.
- Your PixelMili Tracking ID (e.g.
pm_abc123xyz) — found in Settings → Domains. - Your Collect Endpoint URL — your tracking domain +
/collect(e.g.https://track.yourshop.com/collect).
Step 1 — Download the template
Go to Settings → Integrations and scroll to the Send data to PixelMili section. Click Download .tpl.
This saves pixelmili-tag.tpl to your computer — a standard GTM
Custom Tag Template file that you'll import in the next step.
Step 2 — Import into GTM
- Open Google Tag Manager and select your container.
- In the left sidebar, click Templates.
- Under Tag Templates, click New.
- In the template editor, click the three-dot menu (⋮) in the top-right corner → Import.
- Select the
pixelmili-tag.tplfile you downloaded. - Click Save. The template is now available in your container.
Step 3 — Create a tag
- Go to Tags → New.
- Click Tag Configuration.
- Scroll down to the Custom section and select PixelMili — Server-Side Tracking.
Step 4 — Configure the tag
Fill in the two required fields first:
| Field | Value | Where to find it |
|---|---|---|
| Tracking ID | pm_abc123xyz |
PixelMili → Settings → Domains |
| Collect Endpoint | https://track.yourshop.com/collect |
Your tracking domain + /collect |
| Event Name | Purchase |
See event reference below |
For purchase or product events, expand the E-commerce Data section and map GTM DataLayer variables to the corresponding fields (see below).
Step 5 — Map DataLayer variables
If your site pushes ecommerce data to the DataLayer (WooCommerce, Shopify, or GA4 ecommerce schema), create GTM Data Layer Variables and plug them into the tag fields:
| PixelMili field | Typical DataLayer key | Example value |
|---|---|---|
| Value | ecommerce.value | 2499.00 |
| Currency | ecommerce.currency | BDT |
| Order ID | ecommerce.transaction_id | ORD-9999 |
| Product / Content IDs | ecommerce.items.0.item_id | prod_42 |
| Product / Content Name | ecommerce.items.0.item_name | Blue Sneakers |
| Number of Items | ecommerce.items.length | 2 |
customer.email | buyer@example.com | |
| Phone | customer.phone | 123456789 |
Step 6 — Set a trigger
Attach a trigger to control when the tag fires. Common setups:
| Event | Trigger type | Condition |
|---|---|---|
PageView | Page View | All Pages |
ViewContent | Custom Event | Event name: view_item |
AddToCart | Custom Event | Event name: add_to_cart |
InitiateCheckout | Custom Event | Event name: begin_checkout |
Purchase | Custom Event | Event name: purchase |
Step 7 — Test and publish
- Click Preview in GTM to open Tag Assistant.
- Visit your website and perform an action (e.g. add to cart).
- Confirm the PixelMili — Server-Side Tracking tag appears in the Tags Fired panel.
- Open PixelMili → Events live feed and confirm the event arrived.
- Once verified, click Submit → Publish in GTM.
Event name reference
| Event name | When to fire | Required custom fields |
|---|---|---|
PageView | Every page load | — |
ViewContent | Product detail page | value, currency, content_ids |
AddToCart | Item added to cart | value, currency, content_ids, num_items |
InitiateCheckout | Checkout page load | value, currency |
Purchase | Order confirmation page | value, currency, order_id, num_items |
Lead | Form submit / sign-up | — |
Custom event names are accepted (max 80 characters). They will appear in PixelMili analytics and be forwarded to platforms that support custom events (Meta, GA4, TikTok).