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
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
Thanks Jordan, looks like this solved it! :)
Thank you,
Karina