Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #663125

    Hello and thanks for support!

    We are working on adding some conversion tracking codes to our website and were trying to add this snippet

    <script type=”text/javascript”>
    adroll_conversion_value = $order;
    adroll_currency = “USD”;
    </script>

    to our thank-you page. It doesn’t seem to work correctly so we were wondering whether the site actually reads javascript off the page like that… is there any way to add the code via functions perhaps? Would you be able to give us a hint here? :)

    Thank you,
    Karina
    Gear Out Here

    #663143

    Hey Karina,

    Try adding your code to the header.php file and change “the_page_name” to the page slug of the thank you page:

    <?php if( $post->post_name == "the_page_name" ) { ?>
    
    <script type=”text/javascript”>
    adroll_conversion_value = $order;
    adroll_currency = “USD”;
    </script>
    
    <?php } ?>
    

    Please try and let me know how it goes :)

    Best regards,
    Jordan

    #668298

    Thanks Jordan, looks like this solved it! :)

    Thank you,
    Karina

    #669270

    Hi,

    Great, glad we could help :-)

    Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘adding javascript to a page’ is closed to new replies.