• Under the “Basic Data” tab of the plugin settings, I checked “Post Terms.” Likewise, in my data layer, I am seeing something like the following:

    {
    pagePostTerms: {grade: [“6″,”7″,”8”], subject: [“Math”,”Science”]}
    }

    As you can see, I have a couple of custom taxonomies, and my WordPress posts can have multiple terms applied from the same taxonomy. I want these taxonomy terms tracked as separate content groups.

    So I set up a Google Tag Manager (GTM) data layer variable called customGroupGrades, and in that variable’s settings, for the data layer variable name, I entered the following based on the data layer snippet shown above.

    pagePostTerms.grade

    Then, in my universal GA tag settings, I added a content group and set the value to this new data layer variable.

    As a result, an array of taxonomy terms (grades) are being specified as the content group. I was hoping that the Google Analytics content group would interpret this array as multiple groups. But instead it interprets it as one group named “3,4,5,6” and so on.

    Is there a way that I can track a custom taxonomy’s terms as content groups so that one page can be in multiple groups? Google says this is possible, but I can’t find a detailed example of how to do this.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • For those looking for the answer, I found the solution in this article. Basically create a separate Trigger for each content group, match the group with a regular expression, and trigger a separate Tag for each content group.

Viewing 1 replies (of 1 total)
  • The topic ‘Multiple taxonomy terms per page get tracked as one term with commas’ is closed to new replies.