• Hi,

    Currently all datalayer information seems to come automatically, and there is no way to edit that information. It would be great, if one could programmatically change the output with filters or some other way.

    We need to for example change phase, event, pagePostType etc based on different situations.

    For example, we have a custom filter page for our products, instead of normal category pages. In many scenarios we need to change also the pagePostType to “article” instead of “page”. Then there are the product pages, to which we would like to insert a lot of custom data which we have from the specific product.

    What would you think about this? Is this implementable? Now there is just huge amount of “static” datalayer output code based on just “normal” wordpress page scenarios, which doesn’t necessary work well for large corporate sites.

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

    (@duracelltomi)

    Hi,

    This plugin implements a general filter: gtm4wp_compile_datalayer
    The recommended approach is to use the constant GTM4WP_WPFILTER_COMPILE_DATALAYER which will be the same in case the value itself is changing.

    If you assign a lower priority, you will get the prepared datalayer in an associative array and you can change any content, any value based on your own logic.

    Is this satisfying for your case?

Viewing 1 replies (of 1 total)
  • The topic ‘DataLayer editing?’ is closed to new replies.