How to add googleads event tracking script to single page header?

I’m trying to figure out how to add a google ads event tracking code to an individual page that is built on BB theme. I’ve found how to add to the header or every page in the help documentation, but I can’t figure out how to add the event code to the header of a single page. Thanks in advance for any help.

You can simply create a template file in the theme. Just copy “tpl-full-width” if you are using BB Theme add any name to that file and on first-line change template name from “Template Name: Full Width” to “Template Name: Your custom template” and add your tracking code to that page.

Now edit the page via WordPress editor and select “Your custom template” in Page Attributes.

All done :slight_smile:

I use the BB child theme, so I added this to the parent theme. But neither tpl-full-width nor my new custom template showed up in “Templates” (this area has also moved since 2020.) This feels very extra for how easy everything else in Beaver Builder is. There has to be a simpler way.

  1. The theme has code settings in the customiser to add either custom javascript or custom html depending on the tracking you are using.
  2. You can edit your functions.php file in your child theme to add custom PHP hooks to add your tracking stuff wherever you like.
  3. You can copy header.php or footer.php from your parent to child theme then add your tracking scripts there.
  4. Beaver Builder has both layout and global javascript settings for you to add tracking javascript.

Thats just a few ways to add scripts and things to themes There are also 1000s of plugins available to add code to headers and footers.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.