0

I have an app that creates a couple of different tags in GTM via the googleapis Node module. I have only used custom triggers until now. I would like to use the system-generated trigger "Initialization - All Pages". However, the triggers list() method only seems to returns custom triggers. How do you get the firingTriggerId for this? This is the tag code:

const createTagRes = await gtm.accounts.containers.workspaces.tags.create({
                    parent: workspacePath,
                    requestBody: {
                        name: configTagName,
                        type: 'googtag',
                        parameter: [
                            {
                                type: 'template',
                                key: 'tagId',
                                value: measurementId,
                            }
                        ],
                        firingTriggerId: [#??? 'Initialization - All Pages'],
                        tagFiringOption: 'oncePerEvent',
                    },
                })

1 Answer 1

0

I am not sure this has been documented by Google

But if you want to use the All Page Views trigger in GTM API.

The trigger id is : "2147479553"

"firingTriggerId": [
    "2147479553"
]

You can create a GTM and set a tag with the trigger

Then export it to see the trigger id in JSON.

Seems like the Trigger id for All Page Views is fixed to 2147479553

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.