Site logo

Archived topic

Adding email marketing tracking code

1 reply · Started by Charles on November 20, 2020

Viewing posts 1–2 of 2

Hi there,

I'm looking to add some tracking code for my email marketing. I need to add it before the close of the body tag. How would I do this with elements?

Thanks in advance.

Charles

Hi there,

you can use the Hook Element:

https://docs.generatepress.com/article/hooks-element-overview/

There are three core WP hooks for this purpose:

wp_head - inside the <header></header>
wp_body_open - immediately after the opening <body> tag
wp_footer - before the closing </body> tag

For your need you would use the wp_footer

Make sure you set the Hook Elements displays to where you want that code to be applied.

This archived topic is closed to new replies.