Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Installing analytics for affiliate partner

  • Hello,
    I am trying to install the analytics code for “Get Your Guide”, a travel experience agent.

    They are telling me to “Paste this code into the <head> of every page in order to visualise the widget and enable analytics data for it.” (and they provide the code).

    Their instructions video is telling me to Go to Appearance – Theme file Editor, look for Theme file header, find the closing <head> tag and paste the analytics code before it.

    However I get a warning that tweaking anything at all in there could mess things up, and to be honest I don’t particularly want to touch it because I am completely clueless.

    So my questions are, what does “every page” mean, when they say paste the code on every page?
    And most importantly, is there a way to do this safely?

    I do have common sense and I can follow instructions but please bear in mind I have zero knowledge of any of this. I appreciate your help and thank you in advance!

  • Hi there,

    so the instructions they provided. DO NOT do that 🙂

    Instead you can use a Hook to insert that code across your entire site.
    To do that:

    1. Go to Appearance > GeneratePress and Activate the Elements module.
    2. Go to Appearance > Elements -> Add New –> Hook

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

    2.1 in the Elements text area copy and paste script provided by the affiliate partner.
    2.2 set the Hook to wp_head this lives inside the <head> of the site.
    2.3 set the Display Rules > Location to Entire Site

    This will hook the script into the head of every page of your site.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.