Home>Support>Javascript SiteOrigin Button

Javascript SiteOrigin Button

By finhelp, 5 years ago. Last reply by Andrew Misplon, 5 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].

Hi guys,

I am trying to run some javascript when clicking on a normal button. However, that doesn´t seem to work. Any ideas why?

I am simply trying to add a tracking parameter, but not even normal javascript is working. I am adding the code to the onclick field…

I tried:

– window.location.href=’google.com’
– pintrk(‘track’, ‘addtocart’) / tracking parameter I want to add
– window.scrollTo(0, 500);

Maybe I am entering the wrong format?

Hope you can help…

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

  1. 5 years, 4 months ago Andrew Misplon
    Hi, I Work Here

    Hi

    Thanks for reaching out.

    window.location.href="https://google.com" works for me. I’ve made small changes.
    window.scrollTo(0, 500); works without any changes.

    I can’t easily test the tracking parameter. Please, send a link to a page concerned. Perhaps you’d like to create a test page? We’ll take a look and advise from there.

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