WooCommerce8 min read5 views

WooCommerce Facebook Pixel View Category with GTM

Track WooCommerce View Category with GTM. Map view_item_list to ViewCategory, inspect product data and compare the event in Meta.

Watch on YouTube

Jump to the code

The short answer

Track WooCommerce View Category activity by mapping view_item_list from GTM4WP to Meta's ViewCategory event in Google Tag Manager. The tutorial export uses a custom event name for this mapping. This guide is for store owners and implementers who need to verify the event and its product data.

  • GTM trigger: view_item_list; Meta event: ViewCategory.
  • If an existing integration sends this event, inspect it before adding another tag.
  • Use a staging store and a test GTM container.
  • Steps and settings checked against linked documentation and tutorial files on 25 October 2026.

Ask an assistant

ChatGPTClaudePerplexity

FREE CALL

30 MIN

Meta stopped counting your leads? Get them counted again.

  1. Pick a time
  2. Check your Meta account with Hassan
  3. See what to do next

On a free 30-minute call, Hassan checks your Meta account with you and shows you what to do next.

Book my free recovery callFree 30-minute call with Hassan.

Not ready to talk? Run a free check

How do I track WooCommerce category views in Meta?

Use view_item_list as the GTM source and ViewCategory as the Meta destination. GTM4WP's event referencegtm4wp.com lists view_item_list among its WooCommerce ecommerce events. A product-list event is not necessarily a category pageview. Scope the trigger to your category pages if that is what you want to count.

Is ViewCategory a standard Meta event?

Use Custom > ViewCategory, as configured in the tutorial export. The Meta templateraw.githubusercontent.com offers separate standard and custom event controls; keep this custom label distinct from standard ViewContent.

What should I record before testing category views?

Record the category URL, list name and products shown. Use these as your comparison record, including any additional product lists on the same page.

How do I connect WooCommerce to GTM?

Connect the staging store through GTM4WP, then check the container ID in Preview.

1. Connect the test store to GTM

  1. On a staging WooCommerce store, install and activate GTM4WP by Thomas Geigerwordpress.org.
  2. In its settings, enter the intended test container ID.
  3. Enable container output.
  4. Start GTM Previewsupport.google.com.
  5. Connect the staging URL.

Use one installation method.

Done when Tag Assistant identifies that container and shows the page events.

How do I check the base Facebook Pixel?

Use the intended existing pixel ID in a separate PageView tag, then verify that base event before adding the conversion tag.

2. Check the PageView tag

  1. Use the template from Meta's GTM repositorygithub.com for a separate base tag.
  2. Enter your intended pixel ID.
  3. Set the base tag to standard event PageView.
  4. Set All Pages as its trigger.
  5. Apply the store's consent controls before testing.

Do not add a second base tag if one already sends PageView.

Done when the preview session shows the intended PageView tag and you can identify the same pixel in Events Manager.

Where does view_item_list come from?

Enable the GTM4WP ecommerce integration, perform the action and inspect view_item_list in Preview.

3. Enable and inspect ecommerce data

  1. In GTM4WP's WooCommerce settings, enable Track e-commerce. The plugin settings referencegtm4wp.com locates older versions under Integration > WooCommerce.
  2. Visit a product category and note its displayed products.
  3. Select view_item_list in GTM Preview.
  4. Inspect its data layer, the values a page makes available to tags.

Done when the event exists and its ecommerce fields agree with the action you performed.

GTM4WP's Products per impression settinggtm4wp.com splits impressions into multiple events. The old value of 20 was an example setting, not a requirement; compare item batches rather than expecting one event per category page.

Which trigger should fire ViewCategory?

Listen for view_item_list, not view_category. Add a category-page condition to the trigger using the Page Path or a verified category marker from your store.

Done when a category visit qualifies and a product page with related items does not.

How do I map the products in a category?

Read the event fields with Data Layer Variables and map the product array through the original parameter generator.

The original Facebook Parameter Generator repository is archivedgithub.com. To retain this tutorial's mapping, import its template into the test container, following Google's template import instructionsdevelopers.google.com.

  1. Download template.tplraw.githubusercontent.com.
  2. In the test container, go to Templates > Variable Templates > New.
  3. Use More actions > Import.
  4. Select the file and save.

Done when Facebook Parameter Generator appears as a variable template with the documented array and key fields.

4. Map the event fields

The ViewCategory tutorial export contains the original Facebook Parameter Generator mappings used below.

  1. Create Version 2 Data Layer Variables for the paths in the table below; Google describes how these variables read data-layer valuessupport.google.com.
  2. Create Facebook Parameter Generator variables for its contents, IDs, name and value outputs.
  3. In each, set the input to ecommerce.items.
  4. Set the ID key to item_id.
  5. Set the name key to item_name.
  6. Set the price key to price.
  7. Set the quantity key to quantity.

contents / content_ids / content_name

Input
ecommerce.items
Check
Facebook Parameter Generator outputs

value

Input
ecommerce.items
Check
Generator value output; list merchandise value, not revenue

currency

Input
ecommerce.currency
Check
Include only when present

content_type

Input
Literal product
Check
The tutorial export's setting
Keep the event data and the Meta property names separate when checking the mapping.

Done when the variables on the selected event resolve to its own products and amounts, with no missing required input.

How should I save the category tag?

Save a custom ViewCategory tag using the category-only trigger you just configured.

5. Save the event tag and trigger

  1. In the Meta Pixel templateraw.githubusercontent.com, select Custom.
  2. Enter or choose ViewCategory.
  3. Enter your pixel ID.
  4. Map the properties above under Object Properties.
  5. Leave automatic ecommerce mapping off for this explicit mapping.
  6. Use the Custom Event trigger for view_item_list, with regular-expression matching off.
  7. Keep the category-page condition from the earlier step attached to that trigger.
  8. Save the tag.

A trigger is the condition that tells GTM when to run this tag.

Done when the saved tag shows ViewCategory, the intended pixel ID and only the intended view_item_list trigger.

How do I check category events in GTM Preview?

Inspect each view_item_list batch on the category page and compare its products with the rendered list.

6. Check each list batch

  1. Open the category in GTM Preview.
  2. Inspect every view_item_list message.
  3. Compare each message's items with the category.
  4. Check the category-only trigger condition.

Done when each intended batch fires the tag and unrelated lists do not.

Where do I find Meta Test Events?

Open Test Events inside Meta Events Manager for the intended pixel; it is separate from GTM Preview.

7. Compare the source event with Meta

  1. In GTM Previewsupport.google.com, visit a product category and note its displayed products.
  2. Select view_item_list.
  3. Inspect the fired tag and variable values.
  4. In Meta Events Manager, open Test Events for the same pixel.
  5. Compare ViewCategory with that action.
  6. Test the store's consent choices.
  7. Record the expected behavior for each consent choice.

Done when the source event, tag and received Meta event agree, and every extra firing has an explained cause.

A fired tag is a local execution check. Keep destination receipt and the field comparison in your notes before handing the draft to the person responsible for release.

What should I keep for release review?

Keep the container ID, tag settings, category URLs and observed batches in your test notes. Leave the configuration as a draft for release review; this tutorial ends with testing.

Can I use the tutorial container export?

Use the existing export as a reference or import it into a separate test container. Google's import workflowsupport.google.com lets you preview changes before confirming them.

DownloadLocked
Download the tutorial GTM container
  • Download the file
  • Emailed to you

Unlock this file

Two details, and the full file is yours

No account needed. Unlock once and every snippet on the blog opens.

We email you a copy.

Optional. Review the imported configuration

  1. Choose Admin > Import Container.
  2. Select the file and a test workspace.
  3. Review the Merge preview.
  4. Replace the imported pixel ID before running any tag.
  5. Check that the export's consent settings match your test plan.
  6. Check that the included base tag matches your test plan.

Done when the import preview contains only the intended changes, the pixel ID is yours and the tags remain a reviewed test draft.

When is this setup the wrong fix?

Use this guide for a custom browser event mapping. If another integration already sends the same action correctly, repair or document that integration before adding another sender. A missing source event needs a plugin or theme investigation first.

  • Adding a second sender: the same action can be sent twice. Inventory app, theme and GTM senders before adding this tag.
  • Selecting a standard event for ViewCategory: it changes the meaning of the setup. Keep Custom > ViewCategory and the view_item_list trigger from the export.
  • Mapping absent fields: the tag can send incomplete product data. Check variables on the event itself before changing the Meta tag.

What should I check after this event?

Follow the next action in the same test session with the ViewContent guide. Keep separate notes for each source event so you can find where the funnel stops matching.

How do I connect category views to product views?

Open a product from the category you just tested and compare its item ID with the earlier list entry. The ViewContent guide above covers the product detail event.

What changed in this guide

  • 25 October 2026: Documented the archived generator import path. Added event-specific field and completion checks and replaced live-publish instructions with test-container review. Corrected the trigger to view_item_list, located Test Events in Meta, and explained impression batching and the custom ViewCategory label.

Sources

11 sources
  1. 1GTM4WP's event reference↩
  2. 2GTM Preview can inspect an unpublished draft↩
  3. 3Meta template↩
  4. 4GTM4WP by Thomas Geiger↩
  5. 5Meta's GTM repository↩
  6. 6plugin settings reference↩
  7. 7Facebook Parameter Generator repository is archived↩
  8. 8Google's template import instructions↩
  9. 9template.tpl↩
  10. 10Google describes how these variables read data-layer values↩
  11. 11Google's import workflow↩