Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconfigure GTM to ingest org and publisher #4783

Closed
1 task
tdlowden opened this issue Jun 6, 2024 · 7 comments
Closed
1 task

Reconfigure GTM to ingest org and publisher #4783

tdlowden opened this issue Jun 6, 2024 · 7 comments
Assignees
Labels
metrics Stats, metrics and data visualizations of catalog

Comments

@tdlowden
Copy link
Member

tdlowden commented Jun 6, 2024

User Story

In order to get accurate org info for public metrics, datagov team wants GTM to accurately consume the data.

Acceptance Criteria

Background

see #4743 for more. GTM tags will need to be reconfigured into dataLayer variables to enable collection

Security Considerations (required)

None

Sketch

TBD

@tdlowden tdlowden self-assigned this Jun 6, 2024
@tdlowden tdlowden added the metrics Stats, metrics and data visualizations of catalog label Jun 6, 2024
@hkdctol hkdctol moved this to 📔 Product Backlog in data.gov team board Jun 6, 2024
@hkdctol hkdctol moved this from 📔 Product Backlog to H2.0 Backlog in data.gov team board Jun 6, 2024
@hkdctol hkdctol moved this from H2.0 Backlog to 📔 Product Backlog in data.gov team board Jun 6, 2024
@tdlowden tdlowden moved this from 📔 Product Backlog to 🏗 In Progress [8] in data.gov team board Jun 11, 2024
@tdlowden tdlowden moved this from 🏗 In Progress [8] to 📡 Blocked in data.gov team board Jun 17, 2024
@tdlowden
Copy link
Member Author

Dependent on #4743 completion to finalize

@tdlowden tdlowden moved this from 📡 Blocked to 🏗 In Progress [8] in data.gov team board Jul 3, 2024
@tdlowden
Copy link
Member Author

tdlowden commented Jul 8, 2024

I have attempted to re-route all the parameters in a pageload to grab the dataLayer variables:

Image

But when I use debug mode to test it, the values do not populate:

Image

Trying to understand what else needs to happen to get this to ingest properly. Maybe we need to add .push to the dataLayer function?

More to come

@tdlowden
Copy link
Member Author

tdlowden commented Jul 8, 2024

It feels like possibly the absence of a <script> src would necessitate a window.dataLayer.push?

Image

Somehow the values are not actually making it to the dataLayer as expected

cc @robert-bryson @jbrown-xentity for more discussion today

@tdlowden
Copy link
Member Author

tdlowden commented Jul 8, 2024

New possible explanations @robert-bryson @jbrown-xentity :

  1. The values vacillate between tickmarks and quotations. As this is an array, an improper punctuation can break it. We need to standardize to all quotes (code basic quotations, not word processor version)

  2. There is an errant comma before the value in node, which is nearly certainly breaking the proper reading of the array. it needs to be removed.

Image

@tdlowden
Copy link
Member Author

tdlowden commented Jul 8, 2024

We got this to work in dev by initiating the window.dataLayer and using dataLayer.push

Image

You can see in debug mode that GTM now has the values:

Image

Now, we just need to get the changes in dev pushed to prod.

@tdlowden
Copy link
Member Author

Moving to blocked until pentesting is done and we can push to prod

@tdlowden tdlowden moved this from 🏗 In Progress [8] to 📡 Blocked in data.gov team board Jul 10, 2024
@tdlowden
Copy link
Member Author

Pushed to prod. GTM updated.

@github-project-automation github-project-automation bot moved this from 📡 Blocked to ✔ Done in data.gov team board Jul 15, 2024
@hkdctol hkdctol moved this from ✔ Done to 🗄 Closed in data.gov team board Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
metrics Stats, metrics and data visualizations of catalog
Projects
Archived in project
Development

No branches or pull requests

1 participant