
-
AuthorPosts
-
May 27, 2025 at 9:36 am #1484714
Hi,
I would like to install the Google Tag Manager. Therefore I have two instructions. (1. Insert this code as high up as possible in the <head> of the page. 2. Also, insert this code directly after the opening <body> tag:) I have read the other threads on this, but still don’t know my way around. If I understand it correctly, I add the code under Google Services > Google Measurement ID (Google Analytics Tracking Code). Does this apply to both paragraphs?
Kind regards,
ebenandersMay 27, 2025 at 10:23 am #1484720Hey ebenanders,
Please try this in your child theme functions.php file:
function ebenanders_add_gmt(){ ?> YOUR CODE GOES HERE <?php } add_action('ava_after_body_opening_tag', 'ebenanders_add_gmt');
Best regards,
RikardMay 27, 2025 at 10:57 am #1484726Hi Rikard,
thank you for your help! Please provide further assistance: The Editor field does not exist on this website, how can that be?
Kind regards,
KarinMay 27, 2025 at 7:28 pm #1484745Hi,
If you have questions outside the current topic, then please open a new thread.
Best regards,
RikardJune 10, 2025 at 2:31 pm #1485281Hi,
With my editor field finally back, I´m not sure where exactly to insert the code. (No coding scills) Please take a look at the screenshot and the code, is that right? The instruction is: “Copy the code below and paste it on every page of your website. Paste this code as high up as possible in the <head> of the page. or Paste this code directly after the opening <body> tag:”
I now have both code blocks in a row, which is probably not correct, is that right?
It irritates me that the code has to be inserted on every page.Thank you for your help!
Best regards,
ebenandersJune 10, 2025 at 7:03 pm #1485299Hi,
Try pasting the code on the second line in your screenshot.
Best regards,
RikardJune 11, 2025 at 9:56 am #1485319Thank you Rikard!
I’m waiting for the ok from the Google Ads agency and will get back to you when I know that it works!Best regards,
ebenandersJune 11, 2025 at 10:08 am #1485321One more question: Do I need any hooks like “wp_head” or the “wp_footer” to render those snippets inside the head tag or after the body tag?
June 11, 2025 at 7:36 pm #1485339Hi,
ava_after_body_opening_tag is the hook being used in the code that you are using.
Best regards,
RikardJune 12, 2025 at 9:20 am #1485362Hi Rikard,
in the meantime, I have received feedback that everything is working, thank you so much!
Best regards,
ebenandersJune 12, 2025 at 1:00 pm #1485368Hi,
Thanks for the update, we’ll close this thread for now then. Please open a new thread if you should have any further questions or problems.
Best regards,
Rikard -
AuthorPosts
- The topic ‘Google Tag Manager installieren’ is closed to new replies.