Automattic/newspack-popups

NTG events not sent for campaigns to Google Analytics

Closed this issue · 5 comments

NTG events are not sent for campaigns to Google Analytics. News Tagging Guide custom events is enabled in settings.

Detailed debugging shows that events are sent for other plugins such as social share. AMP is completely disabled and not used anymore for this case.

dkoo commented

@yogeshbeniwal so that I understand the issue: on a site not using AMP at all, the Campaigns plugin doesn't fire NTG events? Does it fire any events? How about on a site that is running AMP? Could you provide exact steps to replicate so I know what to look for?

@dkoo It doesn't fire any events. Campaigns are shown to visitors but neither events are sent to GA, nor campaign analytics shows any events in graph.

Not sure about website running with AMP, it was working fine recently with AMP transitional mode. Have completely disabled AMP now.

dkoo commented

Thanks for clarifying—we'll look into this.

dkoo commented

@yogeshbeniwal I'm unable to replicate on a new test site. Replication steps:

  1. On the new test site, connect Site Kit and Analytics.
  2. Set up Campaigns plugin and publish a prompt containing a Jetpack Mailchimp newsletter signup block.
  3. Disable AMP plugin.
  4. In a new session, view the prompt.
  5. In Dev Tools > Network, observe a request to https://google-analytics.com/?collect with an event category of NTG newsletter and event label of newsletter modal impression 1.
  6. In the GA dashboard, under Realtime, observe an event captured matching the request.

Screen Shot 2022-05-16 at 2 35 26 PM

If you're seeing different results, can you specify what's different in your setup from my testing steps?

Thank you @dkoo. Disconnecting and reconnecting analytics in Site kit solved the issue.