Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #861474

    kisschicken
    Participant

    So I followed the instructions in this thread: https://community.theme.co/forums/topic/adwords-remarketing-code/ to add my remarketing code.

    I took the code provided by Google, as well as the code below, and plugged it into my theme function.php:

    function my_custom_footer_output() {
    ?>
    …Google provided code is here…
    <?php
    }

    add_action( ‘wp_footer’, ‘my_custom_footer_output’, 99999 );

    But I always get an error. What am I doing wrong?

    #862066

    Rupok
    Member

    Hi there,

    Thanks for writing in! Would you share a screenshot of your error?

    Also share your complete code (set private reply if it’s confidential) so that we could take a look.

    Cheers!

    #862735

    kisschicken
    Participant

    So this is what I pasted into my functions.php

    function my_custom_footer_output() {
    ?>
    <!– Google Code for Remarketing Tag –>
    <!————————————————–
    Remarketing tags may not be associated with personally identifiable information or placed on pages related to sensitive categories. See more information and instructions on how to setup the tag on: http://google.com/ads/remarketingsetup
    —————————————————>
    <script type=”text/javascript”>
    var google_tag_params = {
    dynx_itemid: ‘REPLACE_WITH_VALUE’,
    dynx_itemid2: ‘REPLACE_WITH_VALUE’,
    dynx_pagetype: ‘REPLACE_WITH_VALUE’,
    dynx_totalvalue: ‘REPLACE_WITH_VALUE’,
    };
    </script>
    <script type=”text/javascript”>
    /* <![CDATA[ */
    var google_conversion_id = 975738687;
    var google_custom_params = window.google_tag_params;
    var google_remarketing_only = true;
    /* ]]> */
    </script>
    <script type=”text/javascript” src=”//www.googleadservices.com/pagead/conversion.js”>
    </script>
    <noscript>
    <div style=”display:inline;”>

    </div>
    </noscript>

    <?php
    }

    add_action( ‘wp_footer’, ‘my_custom_footer_output’, 99999 );

    I’m not getting an error now. It just doesn’t show the remarketing tag in the tag manager.

    #863399

    Rue Nel
    Moderator

    Hello There,

    After making any changes, since you are using CDN, you need to clear your site cache first before testing your site. To assist you better with this issue, would you mind providing us the url of your site with login credentials so we can take a closer look? This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    To do this, you can make a post with the following info:
    – Link to your site

    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thank you.

    #866120

    kisschicken
    Participant
    This reply has been marked as private.
    #866846

    Nico
    Moderator

    Hi There,

    Would you mind also sharing us your FTP so we could check your setup further.

    Don’t forget to set it as private reply.

    Thanks.

    #867987

    kisschicken
    Participant
    This reply has been marked as private.
    #868813

    Lely
    Moderator

    Hi There,

    I’ve updated this line :
    add_action( ‘wp_footer’, ‘my_custom_footer_output’, 99999 );
    To this:
    add_action( 'wp_footer', 'my_custom_footer_output', 99999 );
    You’re using pretty quotes. See attached screenshot.

    Hope this helps.