Skip to content

Add current Page ID and Question ID to URL of the opt-in ladder #383

Description

@bryancasler

This could be a little tricky, but I'd like to add the current Page ID and Question ID to the opt-in ladder URL so that it gets recorded with the form submission into "Campaign Data 33" on the Transaction Export.

This would then allow us to see which pages are generating opt-in ladder engagement, along with which submission resulted in which opt-in.

The reason it's tricky is that those URL arguments need to be there from the page load so I'm thinking we add a bit of JS to the page template used by the opt-in ladder so it fires before GTM/GA4 can that does the following. It looks for the presence of these values and if they're not there it reloads the page and adds them. This would cause a double page load every time, but given the minimal nature of the opt-in ladder I don't think it would be visually disruptive, thought we might need to add some CSS handling if it causes any flashing. That CSS could hook on this data attribute added to the body data-engrid-js-loading="finished"

If we do this we get MUCH better analytics from the transaction export but we can no longer depend on the EN view count since it'll register 2x

Instead of doing this we could staff that data into other Transaction Fields, but then it becomes a client-by-client conversation to figure that out and makes collective reporting more difficult.

Related to this conversation I'm working on a visualizer that helps pull these types of metrics: https://github.com/4site-interactive-studios/opt-in-ladder-metrics

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions