You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.
FB analytics code to work seamlessly along with Google Analytics Tracking code
What happened instead?
Following error comes up in IA production feed when I add FB analytics code along with Google Analytics code
“Unsupported Class: The
element has an unsupported class value in the class=op- tag. For more information on the class values supported in element you’re using, refer to the Format Reference of the Instant Articles documentation.”
For Google, I just specified the Google Tracking ID in the provided box.
For FB Analytics, I pasted the following tracking code in the “Tracking code” box
I am having this same issue. One thing I noticed after going through and editing the markup in Facebook publishing tools is if you remove any extra <iframe> tags so that all scripts are wrapped in a singe tag, the error goes away.
I currently have three tracking scripts that need to run simultaneously, so any help with this would be greatly appreciated.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What did you expect to happen?
FB analytics code to work seamlessly along with Google Analytics Tracking code
What happened instead?
Following error comes up in IA production feed when I add FB analytics code along with Google Analytics code
“Unsupported Class: The
element has an unsupported class value in the class=op- tag. For more information on the class values supported in element you’re using, refer to the Format Reference of the Instant Articles documentation.”For Google, I just specified the Google Tracking ID in the provided box.
<script> window.fbAsyncInit = function() { FB.init({ appId : ‘xxxxxxxxxx’, cookie : true, xfbml : true, version : ‘v2.8’ }); FB.AppEvents.logPageView(); }; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = “//connect.facebook.net/en_US/sdk.js”; fjs.parentNode.insertBefore(js, fjs); }(document, ‘script’, ‘facebook-jssdk’)); </script>For FB Analytics, I pasted the following tracking code in the “Tracking code” box
I have replaced my Page ID with “xxxxxxxxxx”.
How can we reproduce this behavior?
Just follow the steps mentioned above
Can you provide a link to a page which shows this issue?
Technical info
Is it that I can place only one of the two tracking codes? Or there is some error in the way I am placing the tracking code for FB?
The text was updated successfully, but these errors were encountered: