[Python] Adding Tags and Triggers to GTM with Python

Discussão em 'Python' iniciado por Stack, Março 8, 2025.

  1. Stack

    Stack Membro Participativo

    Hi I am connected to my Google Tag Manager account via python. the below code successfully adds a new trigger. but I want to be able to add the conditions (see image)

    The trigger is created with ONLY "All Elements" How do I add the "Click Element" "MATCHES CSS SELECTOR" ".test"

    [​IMG]

    GA_trigger = {
    'name': 'TESTs',
    'type': 'CLICK',

    trigger_response = service.accounts().containers().workspaces().triggers().create(
    parent=f"accounts/{ACCOUNT_ID}/containers/{CONTAINER_id}/workspaces/{WORKSPACE_ID}",
    body=GA_trigger).execute()

    Continue reading...

Compartilhe esta Página