• I have a blog that works for several domains (but it is not a multi-domain of wordpress), I was trying to define the GTM_CODE by the functions of my theme with:

    define(‘GTM4WP_OPTION_GTM_CODE’, ‘GTM-XXXXX’);

    This would be the correct parameter, can I do this?

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

    (@duracelltomi)

    Hi,

    This constant is internal to the plugin and should not be modified. It defines where to find the proper key in the settings array for the GTM container code. This does not store the GTM ID itself.

    Setting plugin parameters via PHP codes is not a recommended approach as I can not guarantee that this will work in future versions. May I ask why you want to do this?

    Thread Starter Renan Bernordi

    (@altendorfme)

    I have a wordpress theme that fits multiple domains, I know I can control various domains by GTM, but it would be easier to have multiple GTM IDs per organization.

    Plugin Author Thomas Geiger

    (@duracelltomi)

    It is currently not possible to define plugin options in a programmatic way, you need to enter every parameter on the plugin UI.

    There are plans to introduce multisite features where you can enter a container ID once for all sites in the network but I can not give you an ETA for this.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Define in function GTMCODE’ is closed to new replies.