How to put script between and tags on a page

Community Forums Forums General Discussion How to put script between and tags on a page

This topic is: not resolved

This topic contains 4 replies, has 3 voices, and was last updated by  kevjonas 1 year, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #16641

    LauraJane
    Participant
    Post count: 14

    I’ve created a Facebook ad and I want to track conversions of new subscribers. I need to paste the script between the <head> and </head> tag on my “thanks for subscribing” page. How do I do that? I’m not sure how to get between those tags on a regular page.

    #16644

    braddalton
    Participant
    Post count: 8873

    Another option would be to the add the code here: Custom Tracking/Conversion Code in your Themes SEO settings.

    Might not be able to do this if not using the Genesis SEO settings.

    Does it need to be on a specific page or is it JS that needs to be between the opening and closing head tags?


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #16649

    LauraJane
    Participant
    Post count: 14

    It  needs to be on a specific page. Right now I use the All in One SEO Pack (plugin).

     

    #16705

    braddalton
    Participant
    Post count: 8873

    Using Genesis Simple Hooks plugin, go to the WordPress Hooks > wp_head Hook and paste this code.

    Find the page i.d you want to track and replace 200 with the page i.d for that specific page.

    [php]
    <?php if (is_page(200) ) { ?>
    <p>Facebook-Code-Goes-Here</p>
    <?php } ?>
    [/php]

    Also replace Facebook-Code-Goes-Here with your tracking code.

    This code includes a conditional tag so it only executes immediately before the closing head tag on the page with the I.D you place where the 200 is.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #28732

    kevjonas
    Participant
    Post count: 1

    Perfect Solution!  Thank you Brad Dalton.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.