Issues Installing Google Tag Manager Custom Code to Pagewrappers Using Pagebuilder

Options
Hello, 


So, I'm out of ideas. I've read every article I could find, and tried to install this code about 100 different ways...I don't know why it's not working. I have the code in a reusable page builder page, and I included it in the head section of all my page wrappers. For some page wrappers, the code install seems to be messing up the page wrapper itself, not showing logos, buttons aren't working etc. For some only parts of the code seem to be working (the part in the body, not the head). 


Here is my pagebuilder code.


<!-- Google Tag Manager -->

<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':

new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],

j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=

'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);

})(window,document,'script','dataLayer','GTM-MT8MN98');</script>

<!-- End Google Tag Manager -->


This is where I link to the reusable pagebuilder
6b0aadcaf807fcd6a972d9acc873ebdd-huge-pa


ANY help would be greatly appreciated....I know eventually I want to expand on this to add e-commerce and fix the donation funnels and all that, but for now I'm just stuck on this basic first step...
Tagged:

Comments

  • Hi Dina -


    Do you have a link to this wrapper?


    Even if it's unpublished, you can grab the pagerwrapper Id and apply that to the URL of a published page with that same wrapper. When you hover over or select "edit" then the UI will expose the pw_id. You can take that ID and apply that to a URL
    f895231785069e94aecc347c72263983-huge-pa

    http://secure2.convio.net/shortcode/site/PageServer?pagename=tester_mcpageface&pw_id=5221.4
    Note: this will override your session for any page within that same wrapper so I'd recommend using Incognito Mode or to clear your browser cache.



    Here are instructions I've used in the past for clients installing GTM:

    1. Create "gtm_wrpr_head" reusable pagebuilder page and insert the following code

    <!-- LUMINATE Google Tag Manager - HEAD section-->
    <script>dataLayer = [];</script>
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','YOUR CONTAINER ID HERE');</script>
    <!-- End Google Tag Manager -->


    2. Create "gtm_wrpr_body" reusable pagebuilder page and insert the following code:

    <!-- LUMINATE Google Tag Manager (noscript) - BODY section -->
    <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=YOUR CONTAINER ID HERE"
    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <!-- End Google Tag Manager (noscript) -->


    3. Insert [[S51:gtm_wrpr_head]] in the "Additional HTML" section of Luminate Online pagewrappers.


    4. Insert [[S51:gtm_wrpr_body]] at the very top of the section of Luminate Online pagewrappers.

    Happy coding,

    Sara

     
  • Hi Sara, 


    Thanks for your response!! Here is a link to a page that uses that page wrapper. https://secure2.convio.net/mspca/site/Donation2?df_id=14201&14201.donation=form1&set.DonationLevel=16907

  • Looks like the content in "reus_GTM_head" isn't published.


    You can check this by adding "&s_debug=true" to (any) LO URL and within the View Source code, it'll insert the <!-- start --> and <!-- end --> for every reusable used. 

    bf2b7c011970064ac2ca32778bfc2cc7-huge-em

     
  • Sara Hoffman:

    Looks like the content in "reus_GTM_head" isn't published.


    You can check this by adding "&s_debug=true" to (any) LO URL and within the View Source code, it'll insert the <!-- start --> and <!-- end --> for every reusable used. 

    bf2b7c011970064ac2ca32778bfc2cc7-huge-em

     

    Hi Sara,


    Looks like it is published though? Unless I'm too deep in this and just can't see something simple?


    Thanks so much for your help!92913a1741f54c09234af734720241a2-huge-ca

     

  • It could be a WYSIWYG issue where the comment or <script> tags are stripped funny. Can't tell you much more without looking more in depth into the HTML of this pagebuilder page.
  • Sara Hoffman:

    It could be a WYSIWYG issue where the comment or <script> tags are stripped funny. Can't tell you much more without looking more in depth into the HTML of this pagebuilder page.

    I THINK I FIGURED IT OUT!! I removed a folder location from my s tag code and that seems to have worked! I can see it in my tag assistant checker now....THANK YOU

Categories