This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Javascript SiteOrigin Button

Open 1 reply developergeneral
6 years ago · Last reply by Andrew Misplon 6 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.

Need fast email support? Get SiteOrigin Premium

Replies

1
  1. Andrew Misplon Staff 6 years, 5 days ago

    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.

Have a different question or issue?

Start New Thread