I'm attempting to track some actions on a webpage that requires me setting a value in the datalayer.
I'd like to do the casperjs/phantom equivilant to this...
dataLayer.push({test: "boom"});
Directly into the web browser's console. This works manually.
It's been a while since I've used casper/phantom so closely. Im currently trying the following...
this.evaluate('console.log(\'dataLayer.push({test: "boom"});\'); console.log("dataLayer");');
Is there a way to achieve my goal?
Also, bonus 'highfive' to anyone who can also allow me to follow this up by accessing the datalayer to verify its been set.
--Edit--
I am also currently launching the runs with options...
--ssl-protocol=any --web-security=no