Comments (15)
FWIW, I think we should avoid using trackEvent
as the name to avoid confusion with our internal function by the same name.
from site-kit-wp.
@benbowler I think it makes sense to add those here. I'll do that in the PR, it's not a big deal to include 🙂
EDIT: Never mind, they were included later 🙂
from site-kit-wp.
From the context/ACs here, would there be a separate, inline script if the user was using two ICE scripts (eg. using two ICE-supported plugins)?
Why output the script inline instead of having a single, common script file we build and include whenever any ICE JS script is used?
from site-kit-wp.
@tofumatt as per out comms offline, I think it makes sense to:
- Have this function be contained within it's own script that we will enqueue
- Register it as a dep of all singular plugin scripts
- Load it async
- Load all singular plugin tracking scripts async too
I'll update the AC accordingly.
from site-kit-wp.
Just one question really, when you say a “proxy function”, do you mean an actual JS Proxy? Or do you just mean that our scripts should include/reference the new trackEvent function and use it to send events?
If it’s the latter, the AC should specify that it should be available (on a Site Kit JS global I’d think).
If the former: why? 😅 Proxies when it’s just for our code seems odd. Maybe it’s just a wording thing that’s tripping me up here 😆
from site-kit-wp.
Just one question really, when you say a “proxy function”, do you mean an actual JS Proxy?
@tofumatt no no, not an actual proxy :) I simply meant a helper function that abstracts our calls to gtag
when we track events. Yes, this should be defined against the global _googlesitekit
or similar var, but that seems more like IB territory. I'll update the AC to reflect the above.
from site-kit-wp.
Sounds good, moving to IB 👍🏻
from site-kit-wp.
- Update includes/Modules/Ads.php
- In setup_assets method:
- If conversionInfra feature flag is enabled instantiate new Script registering the above JS file and pushing it to the $assets array.
- It should include 'execution' => 'async' in the arguments.
I do not think this is correct, as Conversion Tracking is not specific to the Ads module, and can be turned on from GA4 without the ads module active, and vice-versa.
I think it may be better to register this script from within the Conversion_Tracking
class. WDYT?
from site-kit-wp.
@10upsimon Yes that makes more sense. Thanks. IB updated
from site-kit-wp.
Thanks @zutigrm IB ✅
from site-kit-wp.
Flagging here that @eugene-manuilov doesn't update the tracking for MailChimp or Popup Maker as these weren't merged at the time this ticket was started.
Should we hold back this ticket and address that here when these two are merged or update those separately?
from site-kit-wp.
QA Update ⚠️
- Tested on dev environment.
- Verified Optin Monster, WP Forms, MailChimp, Popup Maker and WooCommerce plugin events.
- Verified that events tracked for WPForms OptIn Monster, Popup Maker, Mailchimp, and WooCommerce providers now tracked with _source: "site-kit".
- Verified when
conversionInfra
feature flag is enabled. - Verified when Analytics is connected.
- Verified when both Analytics and ads module are connected.
- Verified when only Ads module is connected.
Note : As mentioned on #8553 (comment) for WooCommerce only 'add to cart' event is getting tracked.
@wpdarren I'm not able to test Contact Form 7 event on InstaWP and TasteWP due to same error. Can you please retest this on your live site ?
Optin monster
WP Forms
MailChimp
Popup Maker
WooCommerce -
from site-kit-wp.
@mohitwp yes, I can confirm that the source appears for the contact
conversion event.
from site-kit-wp.
QA Update ✅
Thanks @wpdarren !
- Tested on dev environment.
- Verified Optin Monster, WP Forms, MailChimp, Popup Maker, Contact Form 7 and WooCommerce plugin events.
- Verified that events tracked for WPForms OptIn Monster, Popup Maker, Mailchimp, and WooCommerce providers now tracked with _source: "site-kit".
- Verified when
conversionInfra
feature flag is enabled. - Verified when Analytics is connected.
- Verified when both Analytics and ads module are connected.
- Verified when only Ads module is connected.
Note : As mentioned on #8553 (comment) for WooCommerce only 'add to cart' event is getting tracked.
Optin monster
WP Forms
MailChimp
Popup Maker
WooCommerce -
from site-kit-wp.
Noting that the source parameter may change but it is currently implemented as defined.
One thing from the AC
All existing plugin scripts of the listed supported plugins should be updated to be loaded async and include this new script as a dependency
All the provider scripts should be loaded using defer
– async
scripts can't have dependencies since the load order isn't guaranteed. There are still a few scripts loading async
so these will need to be updated in a follow up.
from site-kit-wp.
Related Issues (20)
- Implement Internal Measurement/Tracking Following ACR KMW Updates
- Enhance compatibility with Docker locally for E2E
- Refactor the `ZeroDataNotification` to use the new lighter `Notification` component. HOT 5
- Release 1.134.0 HOT 4
- Add "Edit in Reader Revenue Manager" link for the RRM module
- Sort Storybook menu items HOT 1
- Enhance feature activation for BC
- Revert the Fix For VRT failures HOT 1
- Google Site Kit plugin fails to load data on my WordPress website HOT 1
- Fix issue where VRT test fails in CI when launching Chromium HOT 1
- Ensure cached audiences are resynced when the No Audiences Banner is shown
- Enhancement for subtle notifications
- Enhancement on CTA order on mobile for subtle notifications
- Creation of `Top traffic source driving leads` ACR KMW HOT 1
- Ensure the "Top content" CTA for creating the custom dimension appears when the corresponding report error shows the custom dimension is missing
- Storybook error during build: `Error: Source and destination must not be the same.` HOT 2
- Refactor the `AudienceTiles` component to make it easier to read
- Gathering data notification - Loader not appearing on 'See other services' CTA click
- 'a.getTime is not a function' error on dashboard
- Zero Data Notification Not Appearing on First Load in New Tab/Window; Requires Page Refresh
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from site-kit-wp.