Alexgaw Posted May 9, 2014 Share Posted May 9, 2014 I am trying to add the re marketing tag but the script is placed in the wrong order and the won't fire up. How can I select to insert the values of the tag above the external script when the page is compiled? This is basic stuff and should be included in the PS core. /Alex Link to comment Share on other sites More sharing options...
NemoPS Posted May 10, 2014 Share Posted May 10, 2014 How are you adding them, at the moment? Link to comment Share on other sites More sharing options...
vekia Posted May 10, 2014 Share Posted May 10, 2014 in addition to what Nemo said, how the code you're trying to add looks like? it's some affiliate tracking code? where you have to insert some variables like order value etc? Link to comment Share on other sites More sharing options...
Alexgaw Posted May 10, 2014 Author Share Posted May 10, 2014 Hi, I use a modified version of the free module by Carlos Adrián Martínez. The problem is that the external javascript does not execute correclty unless the var values are placed before the external JS link in the compiled file As it is now, all external js links are gather together and after them you have the inline JS where i have dynamical defined variables. I need help to place the inline JS values BEFORE the external JS link in the compiled file: Example how the order must look. <script> var google_tag_params = blablabla:'v1', bla2:'v2', bla3:'v3', </script> <script scr:externalink> </script> Today the PS 1.6 orders them in opposite order. <script>external</script> <script>external</script> <script>external</script> <script>external</script> <script> All the rest of the inline JS in the all the pages </script> So the question is how to change this order. PS: I have looked into using addJsDef function but it it has 2 limitations: 1. I need to wrap all the google variables in CData. 2. The var google_tag_params has multiple values and it wont work with this function. It will add "" around it . Thankfull for a solutions. Link to comment Share on other sites More sharing options...
sixfingers76 Posted July 18, 2014 Share Posted July 18, 2014 I have the same problem Any solution? Link to comment Share on other sites More sharing options...
Recommended Posts