# HubSpot CMS tagging — content.lyreco.com/create-my-lyreco-account
Goal: when a visitor completes the create-my-lyreco-account form, fire three conversions from the HubSpot-hosted page:
1. GA4 custom event lyreco_account_form_submit (property G-368886698)
2. Google Ads conversion AW-10896946911 / LsSbCPLmhZcZEN_tiMwo
3. LinkedIn Insight conversion 27842865 (partner 3989897)
No GTM container, no external dependency beyond the three vendor tag bases.
---
1. Paste in HubSpot — Settings → Website → Pages → Edit head HTML
`html
`
2. Paste in HubSpot — Settings → Website → Pages → Edit footer HTML
`html
).
window.fireLyrecoAccountConversion = function (params) {
params = params || {};
if (typeof gtag === 'function') { // 1) GA4 — custom event with parameters gtag('event', 'lyreco_account_form_submit', { form_id: params.form_id || '', form_variant: params.form_variant || 'two_page_form', preferred_payment_method: params.preferred_payment_method || '', page_location: window.location.href, page_referrer: document.referrer });
// 2) Google Ads conversion gtag('event', 'conversion', { send_to: 'AW-10896946911/LsSbCPLmhZcZEN_tiMwo', // value: 0, currency: 'GBP', // uncomment to attach a value transaction_id: params.form_submission_id || '' }); }
// 3) LinkedIn Insight conversion if (typeof window.lintrk === 'function') { window.lintrk('track', { conversion_id: 27842865 }); } };
// HubSpot embedded-form submit hook. window.addEventListener('message', function (e) { if (!e || !e.data || e.data.type !== 'hsFormCallback') return; if (e.data.eventName !== 'onFormSubmitted') return;
var f = (e.data.data && e.data.data.submissionValues) || {};
window.fireLyrecoAccountConversion({
form_id: e.data.id || '',
form_submission_id: (e.data.data && e.data.data.submissionId) || '',
form_variant: f.form_variant || 'two_page_form',
preferred_payment_method: f.preferred_payment_method || ''
});
});
})();
`
3. Test plan (5 min, browser-only)
1. Open https://content.lyreco.com/create-my-lyreco-account in Chrome with DevTools → Network → filter collect (GA4), googleads.g.doubleclick (Google Ads), px.ads.linkedin (LinkedIn).
2. Confirm one collect?v=2&tid=G-368886698&… hit on page load → GA4 page_view firing.
3. Confirm one px.ads.linkedin.com/collect?pid=3989897 hit on page load → LinkedIn Insight base loaded.
4. Submit a test form. Watch for three hits in quick succession:
- GA4 collect with
en=lyreco_account_form_submitand your event params, - Google Ads conversion with
tid=AW-10896946911andcd=LsSbCPLmhZcZEN_tiMwo, - LinkedIn
lintrk.gif?pid=3989897&conversionId=27842865.
27842865 ticks within ~24 h.
4. Operational gotchas
- Don't double-fire. If the form redirects to a thank-you page AND the
onFormSubmittedlistener also runs, conversions count twice. Pick one trigger: either keep the postMessage listener (works for embedded forms that stay on the same page) OR drop it and puton the thank-you page directly (more reliable when the user has slow JS / closes the tab fast). - GA4 custom dimensions.
form_variantandpreferred_payment_methodonly show in GA4 standard reports if registered as event-scoped custom dimensions in GA4 Admin → Custom Definitions. BigQuery raw is unaffected. - Consent / GDPR. If Lyreco runs a consent banner on
content.lyreco.com, the GA4 + LinkedIn + Google Ads tags must respect it. Wrap the three calls in a consent check, or use gtag'sconsentAPI (gtag('consent', 'default', {ad_storage:'denied', analytics_storage:'denied'})then update on accept). - Data flow. This populates Lyreco's GA4 property + Google Ads + LinkedIn — none of these route into our Oracle warehouse automatically. The Oracle GA4 ETL only carries the webshop property. If we want the event in
ga4_action_events, that requires extending Lyreco's ETL to include the content.lyreco.com GA4 stream. Today we bridge via the HubSpot Contacts API (workers/sync_hubspot_onboarding_submissions.py).
---
_Authored 2026-06-01. IDs verified live: GA4 G-368886698, Google Ads AW-10896946911 / LsSbCPLmhZcZEN_tiMwo, LinkedIn partner 3989897, LinkedIn conversion 27842865._