-
Notifications
You must be signed in to change notification settings - Fork 294
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
Tag Manager support for Web Stories #2070
Comments
cc @felixarntz |
@swissspidy This is a bit more involved than just adding the hook:
|
Ah, forgot about the whole detection and container selection part. |
Would this be as simple as detecting whether the plugin is active?
Noted 👍 |
I've included the improvement to consider the Web Stories plugin for the AMP mode detection in #2998. Afterwards we should be able to get this sorted. |
IB ✅ |
QA Update:
|
You shouldn't need to activate the AMP plugin for this. When you create a new story in the Web Stories editor and preview that story on the frontend, you should see some |
@swissspidy perfect, thank you for the explanation! |
Feature Description
Site Kit currently only prints an analytics tag for Web Stories when using the Analytics module.
The Tag Manager module does not support Web Stories yet. Can we fix this?
For reference, the Analytics module config:
site-kit-wp/includes/Modules/Analytics.php
Lines 143 to 160 in 84c9727
And the Tag Manager one (no mention of Web Stories):
site-kit-wp/includes/Modules/Tag_Manager.php
Lines 128 to 143 in 84c9727
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Google\Site_Kit\Modules\Tag_Manager\AMP_Tag
class) in Web Stories if an AMP container has been configured, the same way that the Analytics module does (seeweb_stories_print_analytics
action).Implementation Brief
Following the completion of #2998
In
includes/Modules/Tag_Manager.php
add a call to print the amp tag for web stories:add_action( 'web_stories_print_analytics', $print_amp_gtm );
For reference, the Analytics module has this logic, see the snippets in the
Feature Description
of this ticket.QA Brief
amp-analytics
is outputted in AMP.Changelog entry
The text was updated successfully, but these errors were encountered: