Home>Support>Javascript SiteOrigin Button

Javascript SiteOrigin Button

By finhelp, 4 years ago. Last reply by Andrew Misplon, 4 years ago.

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. 4 years, 6 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