How to add transaction id to google tag manager (gtm)?

by laverna_hirthe , in category: SEO Tools , 6 months ago

How to add transaction id to google tag manager (gtm)?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

Member

by dudley , 6 months ago

@laverna_hirthe 

To add a transaction ID to Google Tag Manager (GTM), you can follow these steps:


Step 1: Create a variable for the transaction ID.

  • Open your GTM container.
  • Go to "Variables" in the left sidebar.
  • Click on "New" to create a new variable.
  • Name the variable (e.g., "Transaction ID").
  • Select the appropriate variable type based on how you can retrieve the transaction ID (e.g., JavaScript variable, Data Layer Variable, etc.).
  • Configure the variable according to the chosen type and save it.


Step 2: Modify the relevant tags or triggers to include the transaction ID.

  • Go to "Tags" in the left sidebar.
  • Select the tag where you want to include the transaction ID.
  • Look for the field where you want to add the transaction ID (e.g., a custom parameter field).
  • To include the transaction ID, use the appropriate GTM variable syntax (e.g., {{Transaction ID}}).
  • Save the changes to the tag.


Step 3: Publish the changes.

  • Click on "Submit" in the top-right corner of the GTM interface.
  • Add a version name and description.
  • Review the changes and publish the container.


After following these steps, the transaction ID will be included in the specified field or parameter for the relevant tags in your GTM container.