• Resolved jkenler

    (@jkenler)


    Has anyone been able to take custom taxonomies created using CPT UI Extended and add them as dynamic variables in the data layer?

    We have added two custom taxonomies similar to the default categories and I’d like to be able to use all 3 for Content Groupings in GA. I have the categories dynamically being set in the data layer by DuracellTomi’s Google Tag Manager for WordPress plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not quite following here, though some of the terms above may be lacking context for me.

    First thing to note is that the only way CPTUI Extended will create taxonomies, is if you’re making then network wide. Otherwise, it’s still the base free plugin handling that.

    Second thing to note is that we only register the post types and taxonomies for the owner of the given site, we don’t really do much beyond that. It’s up to the site owner to start including those created content types in with their existing theme/plugins, as necessary and possible.

    Regarding the specifics above, not certain what you’re referring to with “GA”, though my initial hunch is Google Analytics. Best I can offer is recreating how that Tag Manager plugin does it, for your own use, or check if there’s a way to filter in more taxonomies into it’s code and have it handle the rest.

    Thread Starter jkenler

    (@jkenler)

    Sorry for the vagueness of the original post. I am the site owner in this case and our developers have used CPTUI (extended & base plugin I guess) to create additional taxonomies for our blog posts. what I am trying to do is capture those taxonomies on each post in the data layer so that I can use them as variables in google tag manager to set the content groupings in google analytics.

    The original category taxonomy is passed to the data layer along with post type and author etc, by DuracellTomi’s Google Tag Manager for WordPress plugin. I was hoping to see if i could replicate that with the other taxonomies.

    I think I came up with a workaround last night by using a DOM variable using a CSS selector to pull it in based on the class of the taxonomy list on the page.

    Does that make more sense?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Yep, but does show that it’s probably a change needing done at the template or other plugin interaction level, more than ours, to be honest.

    I have to believe there’s a way to do it, I just can’t say how, and we’re not going to have a setting for it at all. Not sure how the current category taxonomy is being set up for it, in regards to what you see when you click view-source, for example.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add Custom Tax Types to Data Layer?’ is closed to new replies.