Aller au contenu

Les articles d'aide existent en allemand et en anglais. Vous les lisez ici en anglais.

Installation

How does the origin of an enquiry get into my CRM?

Through your form, on every plan: give it the attribute data-metrunio-lead, and with consent to analytics the SDK fills the fields metrunio_lead_id, metrunio_source, metrunio_medium, metrunio_campaign, metrunio_click_id and metrunio_click_platform; without consent they stay empty unless you switch on “Source without consent as well” for the site. With the lead ID, the offline import finds the later deal from your CRM in the journey.

Can Metrunio write source, campaign and an identifier into my contact form?

For enquiries, measurement often ends at the form: the deal closes weeks later in the CRM, and by then nobody knows where the enquiry came from. That is why the SDK writes the origin and an identifier into the form itself. They travel with the enquiry into your CRM; with the deal, the identifier comes back through the offline import and connects it to the journey.

Setting it up

<form action="/enquiry" method="post" data-metrunio-lead>
  <input name="email" type="email" required />
  <button>Send</button>
</form>
  • The SDK fills the form on load, whenever consent changes, as soon as someone enters a field, and right before it is submitted. It adds missing fields as <input type="hidden">; an existing field with the same name is filled.
  • If you have a thank-you page, report the enquiry there with metrunio.conversion({ type: 'lead' }). Without an identifier of its own, the SDK takes the one from the form.
  • Without a thank-you page, write data-metrunio-lead="submit". The SDK then reports the enquiry itself on submit, once per identifier. What counts is the submission, not your server’s response.
  • Fill forms that appear later with metrunio.fillForm(form), passing the form or a selector such as '#enquiry'.

The fields

FieldContentNeeds
metrunio_lead_ididentifier of the enquiry, such as lead_3f2a…; valid for the sessionconsent to analytics
metrunio_sourceutm_source the visit started withconsent to analytics; without it only with “Source without consent as well”, then from this page’s address
metrunio_mediumutm_medium, likewiselikewise
metrunio_campaignutm_campaign, likewiselikewise
metrunio_click_idthe ad platform’s click ID, such as the gclidconsent to marketing
metrunio_click_platformgoogle, meta, microsoft, tiktok, linkedin or metrunioconsent to analytics

Source, medium and campaign come from the address the visit started with, not from the page with the form. The SDK does not assign a channel in the browser: your origin rules in Metrunio do that, and your CRM gets the values as they were in the address. The whole journey hangs on the lead ID.

Consent

  • Without consent to analytics, all fields stay empty. The SDK does not even read the page address for them.
  • It writes the click ID only with consent to marketing. Under statistics, the platform remains, just as Metrunio itself stores only the source of a click under statistics, not its ID.
  • After consent is withdrawn, the SDK empties the fields it filled itself. After metrunio.reset(), a new identifier begins.

Legal note

What arrives in your CRM, you process there as the controller. The fields end up there together with the name and email address of the enquiry and thereby become personal data, source, medium and campaign included. The lead ID connects a record in your CRM with a journey in Metrunio; describe this where your privacy policy describes the measurement, and clarify it with your data protection adviser.

Text for your cookie banner

For consent to analytics to cover this purpose, the description of the category should name it. Adapt it to your data flows and periods: “With your consent to analytics, we link the source and campaign of your visit to your enquiry in our CRM and to a sale reported later, using an enquiry identifier. This lets us see which visits lead to enquiries and sales. We use platform click identifiers for this only where you have also given the corresponding marketing consent.” You do not need an extra checkbox for this.

Source without consent as well

In “Setup”, each site has the setting “Source without consent as well” under “Source in forms”. It is off. If you switch it on, the SDK writes source, medium and campaign from the current page’s address into the form without consent to analytics, as it did before 12 October 2026. Nothing more: no lead ID, no click ID, no platform, nothing in the browser’s storage. With consent, the setting changes nothing.

  • The setting appears in the embed code as formSourceWithoutConsent: true. Copy the code again after switching. In the GTM template it is the box “Write the source into forms without consent as well”; in the template file from the portal, which is in German, it reads “Herkunft auch ohne Einwilligung in Formulare schreiben” and is pre-filled with the site’s setting.
  • The apps and plugins for Shopify, Shopware and WordPress do not pick up the setting. There, the fields stay empty without consent.
  • If you load the SDK yourself, pass the option to metrunio.init.

Legal note

You justify the consent-free operation yourself; Metrunio does not make this decision for you. Two processes need to be considered separately: the SDK reads the address in the browser, which is access to the end device (Section 25 TDDDG). And your CRM links the source to a named enquiry. Both need a legal basis, and both belong in your privacy policy. That it is only UTM data is not enough on its own. Before switching it on, record which exception under Section 25(2) TDDDG covers the access and which legal basis under the GDPR covers the matching in your CRM; if you find no sound exception, only this setting stays off, not source in forms as a whole. This note is not legal advice; clarify the setting with your data protection adviser before switching it on.

Form plugins and embedded forms

  • Contact Form 7: add the fields as hidden fields, for example [hidden metrunio_lead_id], and include them in the mail with [metrunio_lead_id]. A small script in the page footer sets the attribute: document.querySelectorAll('.wpcf7-form').forEach((f) => f.setAttribute('data-metrunio-lead', ''));.
  • Many form plugins and form services only store fields they created themselves, and some show the form in an iframe the SDK cannot reach. Add hidden fields with exactly these names there and check with a test enquiry whether the values arrive in your CRM.
  • If they do not, assign the identifier yourself: report the enquiry with metrunio.conversion({ type: 'lead', leadId }) and an identifier your CRM already knows.

And back

When an enquiry turns into a deal, export it from your CRM with the lead ID in the lead_id column and import it as an offline conversion under “Orders & goals”. Metrunio finds the journey for that identifier and recalculates the attribution.

Dernière vérification le 15 oct. 2026

Également demandé

  • Fill hidden form fields
  • Pass UTM parameters to the CRM
  • Store the gclid in a contact form
  • How do I connect a CRM lead to its journey?
  • Hidden fields for HubSpot, Pipedrive or Salesforce
  • Where did this enquiry come from?
  • Assign a lead ID automatically
  • Does Metrunio fill the form without consent?
  • Why are the source fields in my form empty?
  • Write UTM parameters into forms without cookie consent

Articles connexes

  • How do I get CRM deals into the reporting?

    Can I import conversions that did not happen on the website?

    You import them as CSV: a lead closed on the phone weeks later just as well as a purchase in the shop. Matching happens through a unique anchor (order ID, lead ID or click ID); rows without such an anchor are rejected rather than guessed.

  • What does the tracking SDK offer?

    Which JavaScript calls are available?

    The SDK provides init, setConsent, page, track, identify, conversion, goal and reset, plus paymentReference for Stripe and PayPal, fillForm for forms, and renderSurvey and survey for the post-purchase question. It loads asynchronously, queues calls made before it loads, and sends events in batches.

  • What happens without consent?

    Is nothing really stored without consent?

    By default, Metrunio stores nothing without matching consent, not even a raw event, and the tracking script sends nothing before a decision. One documented case differs: purchases and refunds your server reports without consent count towards measured revenue for revenue reconciliation, with their order number and without browser, customer or advertising identifiers, and are not attributed. After a refusal this only applies with an activated additional instruction. Without consent on the ad side, the click redirect passes on only the campaign, no click ID.

  • How is a journey created?

    How do individual signals become one coherent journey?

    A journey is a chain of measured signals with timestamp, source and identifier, not a reconstruction. Signals are joined when they carry a shared, unambiguous identifier.

  • How do I install the code snippet?

    How do I install Metrunio without a tag manager?

    The finished code block is in the portal under “Setup → Snippet” and contains site ID and collector address. You see the write key only once, when it is created; if it is no longer known, the code carries the placeholder YOUR_WRITE_KEY and a button next to it creates a new one. The block belongs immediately before the closing head tag and loads asynchronously.

Voyez ce que racontent vos données.

Explorez d’abord la démo. Un compte personnel n’est actuellement disponible que sur invitation.

Ouvrir la démoDemander un accès