[VTEX Legacy] How to set up the Order ID variable in Google Tag Manager

On VTEX stores, the Order ID is displayed as a URL parameter on the order success page.

You can set up a variable to capture the Order ID from the URL parameter and send it in the Order Placed event tag.


1. Go to your Google Tag Manager account and click on Variables from the left-hand menu.

2. Click on “New” under User-Defined Variables.

3. Click on “Variable Configuration”.

4. Click on “URL” on the list, under Navigation.

5. Choose “Query” under Component Type.

6. Enter og under Query Key

7. Name the variable and click on “Save”

8. Don’t forget to Publish your container to submit the changes.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.