Tagged: Google Analytics
- November 14, 2016 at 10:20 pm #10652FocusfiedParticipant
Hi. I put the google tag manager code for tracking in theme header page right after <header> opening and <body> opening. header is fine but I am not sure where the <body> opening is to complete the tracking placement.
If I put it right after below code, google is saying that is outside the body tag. I am not a coder. Where would I put it?
<body <?php body_class();
* supernews_action_body_attr hook
* @since supernews 1.0.0
* @hooked supernews_body_attr- 10
do_action( ‘supernews_action_body_attr’ );?>>November 15, 2016 at 3:29 am #10654acmesupportsModerator
Please find the screenshot here and know the end of the body tag. You can add the codes in between that
>codes here.>Let us know, if the problem is not solved.
RegardsDecember 23, 2016 at 3:01 am #11773FocusfiedParticipant
I inserted it as you said and it is saying the tag is still outside the body tag. Can you help?December 23, 2016 at 4:32 am #11776acmesupportsModerator
May be the code you added mistake. Please have a look on the below code snippet and try again.
<body <?php body_class(); /** * supernews_action_body_attr hook * @since supernews 1.0.0 * * @hooked supernews_body_attr- 10 */ do_action( ‘supernews_action_body_attr’ );?> //Your Code Goes Here // >
Hope, this will solve your issues.
- The topic ‘Google Tag Manager code’ is closed to new replies.