0
votes

I have multiple urls, with the following pattern:

/products/?category=category_name

I want to create virtual page(changing url, title) for that type of url. In code below GTM code I have:

dataLayer.push({ 'event':'VirtualPageview', 'virtualPageURL':'/category/category_name', 'virtualPageTitle' : 'category_name' });

In GoogleTagManager I set:

  • two Data Layer Variable: virtualPageTitle, virtualPageURL
  • a trigger virtualPageView enter image description here

  • and the tag

enter image description here

I'm using wasp, to check data, the dataLayer looks like is push: enter image description here

and I have the values:

event: VirtualPageview
virtualPageURL: /category/rumba
virtualPageTitle: rumba
gtm.uniqueEventId: 2

but the VirtualPageView tag is not triggered, and I don't understand why. I check also with LivePreview.

1
You added the same screenshot twice (trigger). Show us your tag.zborovskaya
@zborovskaya updated imageuser3541631

1 Answers

2
votes

When you specifiy the event name in an Event trigger, it's not necessary to filter (again) for the Event variable.

In your case, you have used the two filters for the same variable with different cases (virtualPageView and VirtualPageView). So both conditions will never be true at the same time, at least with case sensitive checking.