Adform Cookie Retrieval Script tag

Adform Cookie Retrieval Script by Stape is a custom Google Tag Manager (GTM) web template designed to retrieve the Adform user ID and store it in a first-party cookie called adfuid. The cookie is then passed to the sGTM Adform tag.

Benefits

  • View-through conversion tracking in sGTM. When visitors convert without a click parameter (adfcookieid) in the URL (such as after viewing an ad) the server container can’t capture the Adform cookie ID on its own. This tag fetches the ID through Adform's script and saves it, enabling attribution for view-through conversions.
  • Converts Adform IDs into first-party cookies. Storing the identifier in a first-party adfuid cookie shields it from browser third-party cookie restrictions and makes it easy to forward to sGTM through GA4 or Data Tag.
  • Network performance optimization. The tag only loads the external Adform script if neither a URL parameter nor an existing adfuid cookie is present. If the user already has a valid ID, no external third-party script is injected or downloaded.
  • Cookie domain customization. Allows you to customize cookie domain and lifetime to keep attribution windows open across repeat visits.

We have more than 200 000 happy clients

Try Stape for all things server-side