Personyze Wiki Personyze Wiki docs
Open Personyze
Docs/ Integrations/ Google Tag Manager
Integrations

Google Tag Manager

Install the Personyze tracking tag through Google Tag Manager — the recommended approach for sites that already use GTM. Includes the critical SPA trigger configuration to avoid conflicts.

4 min read Updated 1 week ago

If your site already uses Google Tag Manager, GTM is the cleanest place to load the Personyze tracking tag — no template editing, deploy and rollback through GTM versioning, no developer push. The Personyze Tracking tag template does more than install the tag: it can translate your existing GA4 ecommerce dataLayer into Personyze product interactions, report specific interactions, write visitor profile attributes from GTM variables, and respect Google Consent Mode.

Prerequisites

  • A GTM container installed on your site.
  • Your Personyze account number — shown in the panel (it is the number in your panel URL, e.g. /panel2/id/8110/, and in Settings → Site profile).
  • The Personyze Tracking template — search “Personyze” in GTM’s Tag Templates gallery.

Basic install

  1. In your GTM workspace: Tags → New, click the tag-config area and pick Personyze Tracking.
  2. Account Number — your Personyze account number.
  3. For use on domains — a space-separated list of the domains to track, like example.com shop.example.com.
  4. Trigger: All Pages (Page View). Fire Personyze as early as possible — earlier firing means more time to identify the visitor, resolve audiences and render personalization before the visitor starts scrolling; late firing shows a flash of original content.
  5. Submit a new GTM version.
Personyze Tracking tag configuration
The tag’s configuration: account and domains, then the four optional groups. Click to enlarge.

Ecommerce tracking — reuse your GA4 dataLayer

Tick Track ecommerce events from the dataLayer automatically and the tag translates standard GA4 ecommerce pushes — view_item, add_to_cart, remove_from_cart, add_to_wishlist, purchase — into Personyze product interactions. If your site already reports ecommerce to GA4, this replaces any separate interaction setup.

  • Trigger setup: attach the tag to a Custom Event trigger with Use regex matching enabled and the event name
    view_item|add_to_cart|remove_from_cart|add_to_wishlist|purchase
    — in addition to (or instead of) the All Pages trigger.
  • Match products by — which column of your Personyze product catalog the reported IDs match: Internal ID or SKU. The IDs in your dataLayer must exist in the catalog, or the interactions won’t attach to products.

Send a specific interaction

The Interaction dropdown sends one Personyze interaction each time the tag fires (on top of installing the tracking code). Fill its fields with GTM variables (e.g. {{Ecommerce item id}}):

  • Product Viewed / Added to cart / Removed from cart / Purchased / Liked (wishlist) — takes Product ID and, where relevant, Quantity.
  • Order completed — all cart items purchased.
  • Article Viewed — takes Article ID, for content recommendations.
  • Category viewed — logs visitor interest; one or more category names, comma-separated.
  • SPA route change — re-runs targeting on a single-page-app navigation. Attach this one to a History Change trigger.
Single-page applications Keep the base tracking tag on a Page View trigger only — Personyze detects SPA route changes internally (see One-Page Applications). If you want GTM to drive re-targeting explicitly, add a second Personyze Tracking tag with Interaction = SPA route change on a History Change trigger — that is the one place History Change belongs.

Visitor profile attributes

Tick Send visitor profile attributes to write values onto the visitor’s Personyze profile — where they become usable in every targeting rule, dynamic content variable and report. Click Add attribute, pick the field, and supply the value as a GTM variable.

Available fields: Email, First/Last name, Phone, Mobile phone, Gender, Birthday, Postal code, City, State, Country, Occupation, Industry, Website, Interests, Subscription type, Lead score, Sale state, Account type, Account balance, Account ID number, Opted in (email, sms) — plus generic slots: Custom text 1–6, Custom integer 1–4, Custom float 1–2, Custom date 1–2.

Consent Mode

Tick Respect Google Consent Mode (analytics_storage) and the Personyze tracker is not loaded — and no cookies are set — until analytics_storage consent is granted. If the visitor grants consent later on the same page, the tracker loads at that moment. Pair it with your CMP’s standard Consent Mode integration; no extra wiring needed.

Verifying the tag fires

  1. In GTM, click Preview — Tag Assistant opens with your site. Personyze Tracking should list under “Tags Fired”.
  2. Dev tools → Network → filter counter.personyze.com — a request should fire on every page load.
  3. In the panel, the visit appears in Live visits within seconds; with ecommerce tracking on, product events show under the campaign’s Interactions step.

Common issues

  • Tag fires but no events in Personyze — usually a wrong account number, or the current domain missing from For use on domains.
  • Personalization doesn’t render / flashes — tag firing too late; fire on Page View and before interfering tags.
  • Ecommerce interactions don’t attach to products — the dataLayer item IDs don’t match the catalog column chosen under Match products by.
  • SPA pages tracked twice — the base tag is on a History Change trigger; move it to Page View and use the SPA route change interaction instead.

Related

Did this page answer your question?
Thank you — that goes to whoever maintains this page.