Site logo

[Resolved] WPcode light

Home Forums Support [Resolved] WPcode light

Home Forums Support WPcode light

Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • #2543709
    Michael

    Hi Fernando, thanks. I’ll try that later; at the moment, I prefer to try things one at a time,

    David, please let me know the code for the header and footer. (and whether it’s worth testing wp_body_open for the footer code),

    Michael

    #2543962
    David
    Staff
    Customer Support

    Ok, lets start from the top:

    1. delete any Elements you have created so far that are related to this topic.

    2. Appearance > Elements –> Add New –> Hook.

    2.1 Give it a Title for the GTag head code

    2.2 In the Text Area add:

    <!-- Google tag (gtag.js) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=AW-1072711480"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'AW-1072711480');
    </script>
    

    NOTE: This is the code from this link

    2.3 Set the Hook to wp_head

    2.4 Set the Display Rules to Entire site

    2.5 Publish the Hook, and exit it.

    3. Appearance > Elements –> Add New –> Hook.

    3.1 Give it a Title for the GTag Footer code

    3.2 In the Text Area add:

    <script>
      window.addEventListener('load', function() {
        if (document.location.href.includes('/nlp-practitioner-training/licensed-nlp-practitioner/')) {
            gtag('event', 'conversion', {'send_to': 'AW-1072711480/jq5MCKjWmooYELiOwf8D'});
        }
        if (document.location.href.includes('/nlp-practitioner-training/nlp-master-practitioner/')) {
          gtag('event', 'conversion', {'send_to': 'AW-1072711480/qY0xCKvWmooYELiOwf8D'});
        }
        if (document.location.href.includes('/nlp-business-practitioner/')) {
          gtag('event', 'conversion', {'send_to': 'AW-1072711480/1-sNCK7WmooYELiOwf8D'});
        }
      });
      </script>

    NOTE this code was taken from this link

    3.3 Set the Hook to wp_footer

    3.4 Set the Display Rules to Entire site

    3.5 Publish the Hook, and exit it.

    And that should be it. Once its done let us know and we can check the sites code.

    #2544016
    Michael
    #2544245
    David
    Staff
    Customer Support

    I can see the one in the head.
    Do you have any caches on your site ? If so can you clear them ?

    #2549277
    Michael

    To David,

    I had this message from Google:

    I see that the codes are firing on the website and are firing as expected! I did verify from my end everything is working fine. The status in the ads account as well for all the three conversions changed to recording conversions. I shall go ahead and close the case now, if you need further assistance with the case please feel free to reach out to me!

    #2549742
    David
    Staff
    Customer Support

    I checked your site again, and I too can see all the codes in the correct place.
    So it sounds like this is working correctly now ?

    #2549825
    Michael

    Thanks, that’s great!

    #2550168
    David
    Staff
    Customer Support

    Glad to be of help!

Viewing 8 posts - 16 through 23 (of 23 total)
  • You must be logged in to reply to this topic.