• Resolved cfcnet

    (@cfcnet)


    I was wondering if I could pull in the author name from the

    <script data-cfasync=”false” type=”text/javascript”>
    dataLayer.push({“pagePostAuthor”:”David Wells”});
    </script>

    in the same way you can set up a DOM in GTM and pull in some meta from

    <meta property=”article:published_time” content=”2016-06-15T09:47:02+01:00″ />

    meta[property=”article:published_time”]

    https://www.ads-software.com/plugins/duracelltomi-google-tag-manager/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    Since WordPress websites always include jQuery, you could create a custom JS variable to get this value:

    function() {
      return jQuery("meta[property='article:published_time']").attr("content");
    }

    Cheers,
    Thomas

    Thread Starter cfcnet

    (@cfcnet)

    Hi there
    How would I pull out this property?
    pagePostAuthor

    Cheers in advance
    Peter

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Here you can see a detailed explanation for this:
    https://gtm4wp.com/how-to-articles/how-to-access-a-data-layer-variable/

    Thread Starter cfcnet

    (@cfcnet)

    Hi there
    That works brilliantly.

    However my structured data is appearing below the </HTML> tag
    So I can’t see it, unless I’m testing the page within the structured test tool.

    Any ideas?

    Cheers in advance.

    Peter

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi Peter,

    The Structured Testing Tools is really out of my scope, I am not an SEO expert and I rarely have to setup such tags. I am so sorry but I can not help with this ??

    Thomas

    Thread Starter cfcnet

    (@cfcnet)

    i was just wondering where about’s in the page code does the structured data normally appear? Have you got an example of a site using your plugin?

    Peter

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi Peter,

    Sorry, I can not give you an example, I had one case in the past but I can’t find it which one it was.

    Thomas

    Thread Starter cfcnet

    (@cfcnet)

    The question I have is, does your plugin add the structured data after the </html>?

    Plugin Author Thomas Geiger

    (@duracelltomi)

    My plugin does not add any structured data to your page. If you experience such coded this must be done either by another plugin or by a tag in your GTM container

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘DuracellTomi's Google Tag Manager for WordPress’ is closed to new replies.