Home>Support>How can I exclude a javascript from one page?

How can I exclude a javascript from one page?

By Chris Robbins, 10 years ago. Last reply by Magus, 10 years ago.
Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

I am using the header and footer scripts plugin and have a site-wide javascript (my tracking/analytics code) but for some reason it is conflicting with an iframe that I need on one of my pages. Rather than placing the code on all pages one at a time, I thought it would be easier to exclude it from that one page (if I can find the solution to make this happen). Can anyone offer some guidance?

On a side note, I have had the hardest time getting Google Analytics to work. I’ve tried all day, but no matter what I do, it keeps displaying the message “tracking not installed”. This seems to be a common problem based on my searches for a solution. I’ve tried adding the code to header.php, to the header/footer scripts plugin, to Yoast, etc., and nothing works. I am so frustrated by how complicated everything has to be, and I’m a pretty smart guy (lol).

If I can find the solution to the first item, and continue using my old tracking program, I think I’ll be satisfied.

I hope everyone has had a good week.
Chris

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 10 years, 1 month ago Chris Robbins

    Hey I just wanted to check to see if any of you guys have a suggestion for blocking a javascript on a single page?

  2. 10 years, 1 month ago Magus
    Hi, I Work Here

    Hi Chris

    The Google analytics code is being referenced twice by the site. Please make sure that anything you have previously tried has been reverted, disable the analytics module in Jetpack and any other plugins you have tried to make this work. Remove the enqueue option for the analytics from your functions.php and add the code directly into the header option of Header/Footer Scripts.

    Let us know how you get on

    Magus

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More