Send Allspice events to Google Analytics
Engage can send a few simple events to your own Google Analytics 4 property, so reader activity shows up next to the rest of your site data. It's off until you turn it on.
What gets sent?
Five events. Each one is just an event name, with nothing attached.
| Event | When it's sent |
|---|---|
allspice_message | A reader sends a message in chat, including tapping a suggested question |
allspice_search | A reader searches |
allspice_save | A reader saves a recipe |
allspice_signup | A reader signs up by email or creates an account (one event per sign-up) |
allspice_interaction | Other reader actions: opening Engage, adding to a grocery list or sending it to a store, starting or finishing Guided Cooking, rating a recipe |
GA4 adds the page, device and traffic source on its own, so you can see which posts drive the most activity.
What do I need first?
- Your site runs the Allspice WordPress plugin.
- Your Google tag is already on your pages with your GA4 Measurement ID. It can come from gtag.js, Site Kit, MonsterInsights or a similar plugin. If that ID isn't on the page, nothing is sent.
- Your privacy policy discloses Google Analytics, and your consent banner covers it.
How do I turn it on?
In the Publisher Portal, go to Integrate, click your domain, and open the Connections tab. The setting is a row in the External connections card, under Data sharing.
- In the External connections card, turn on Send events to Google Analytics.
- Enter your GA4 Measurement ID. It starts with
G-. You'll find it in GA4 under Admin > Data streams > your web stream. - Tick the box confirming that your privacy policy discloses Google Analytics and your consent banner covers it.
It saves and turns on once the ID is valid and the box is ticked. Your site picks up the change at the next plugin refresh. To apply it right away, click Refresh now on the WordPress tab.
To turn it off, tap the same switch.
What if I only use Google Tag Manager?
If your site loads GA4 only through Google Tag Manager, Engage pushes the same event names to the dataLayer instead. Set up GTM to pass them on:
- Create a trigger: Custom Event, event name
allspice_.*, with Use regex matching turned on. - Create a tag: Google Analytics: GA4 Event, your Measurement ID, Event Name
{{Event}}, fired by that trigger. - Submit and publish the container.
How do I count sign-ups as conversions?
In GA4, go to Admin > Events (or Key events) and mark allspice_signup as a key event. You can do the same for allspice_save.
New events can take 24 to 48 hours to show up in GA4 reports. Realtime and DebugView show them sooner.
What is never sent?
No search text, no chat messages, no email addresses, no reader IDs, and no parameters of any kind. Unsaves, shares and page views aren't sent either. GA4 already measures page views.
How does consent work?
Events only go out when the reader's consent allows storage. Nothing is sent when:
- a reader in the EU or UK declines, or hasn't answered your consent banner;
- the browser sends Global Privacy Control;
- the reader has opted out of sale or sharing under US state privacy laws;
- the reader declines under Quebec's Law 25.
Google's own consent mode still applies on top of this. Events go only to the Measurement ID you entered, never to other Google tags on the page, such as Google Ads or your ad network's analytics. Allspice never adds the Google tag, never changes your consent settings, and stores nothing new.
You're responsible for disclosing Google Analytics in your privacy policy and covering it in your consent banner. That's why the portal asks you to confirm it before you turn this on.
Why are my GA4 numbers lower than in the portal?
Consent choices, ad and tracker blockers, and browsers that block Google Analytics all mean GA4 sees fewer events than the Allspice portal's analytics. That's expected. Use the portal for totals, and GA4 to compare Engage activity with the rest of your site.
Why don't I see any events?
- Check that the Measurement ID in the portal matches the one on your site.
- Check that your Google tag loads on your recipe pages.
- Make sure you've accepted analytics cookies in your own browser before you test.
- Watch GA4 DebugView or Realtime rather than the standard reports.
- Click Refresh now on the WordPress tab after turning it on.
Still stuck? See Troubleshooting or contact support.