• I have a learning management system where the course(product) page is being displayed for the datalayer “ecomm_pagetype” as “other” instead of “product” is there any way to change this?

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

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

    (@duracelltomi)

    Hi,

    You can use the gtm4wp_compile_datalayer WordPress/PHP hook to change any data in the data layer before it gets written into the frontend.

    Thread Starter Dirto Grigio

    (@dirtogrigio)

    @duracelltomi Thank you for the support.

    You have some example of this hook to show me?

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    Sorry, I do not have any example code currently.
    But it can be used just like any other WP filter.

    There will be one parameter for the filter function, an associative array with the data layer content already compiled and you need to return a modified associative array.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Datalayer ecomm_pagetype does not match reality’ is closed to new replies.