Optimize
5.1K members online now
5.1K members online now
Everything you need to know about setting up Optimize including creating your account and container, linking to Google Analytics and how to tag your site.
Guide Me
star_border
Reply

Javascript file only on test page B

Follower ✭ ✭ ☆
# 1
Follower ✭ ✭ ☆

Hi All,

 

Is it possible to only load a javascript library on the variation page? We would like the script the rearrange the page through the use of javascript.

 

Thank you,

Tiaan

1 Expert replyverified_user

Javascript file only on test page B

Google Employee
# 2
Google Employee

Hey Tiaan, 

 

Yes, you could add custom javascript to the head of the page if you want - just note that it'll still execute asynchronously.  Will that work for your use case?  What JS library would you add?

 

Thanks,

Jon

Javascript file only on test page B

Follower ✭ ✭ ☆
# 3
Follower ✭ ✭ ☆

Hi Jon - 

 

What we would like to do is to move products around, but use js to do so. Typically you would have a variation page with the products set. I hope this makes sense.

 

Thanks,
Tiaan

Javascript file only on test page B

Google Employee
# 4
Google Employee

Tiaan,

 

You should be able to do that with JS; are you talking about both a library and a custom script, or just one or the other?  Have you come across the "run javascript" function in the editor?

 

Thanks,

Jon