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
1Hi
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.