1. In Google Cloud Console, create a new project.
2. Give the project a name, e.g. Profit Tracking TAGGRS, and then click Create.
1. Click View all products at the bottom left, scroll down until you get to Firestore, select it.
2. Click Create database. Next, select Native mode. Then select the nearest location and click Create database.
3. create a collection by clicking on START COLLECTION.
4. Enter the Collection ID. Since we are talking about products we choose Products.
5. Fill in the Document ID fill in the item ID of your product. In this case, we use 15123 as an example.
Then enter the following:
Field name: value
Field type: string
Field value: profit
As an example, we will use a profit of 10 per product, in which currency this is in depends on how you have set this up in Google Tag Manager. Then do this for all products.
6. Click Save to save the collection.
Then, you get a summary where you can see the collection, the item IDs of the products and the profit per product.
Once Firestore is set up, you need to start linking this along with TAGGRS so that the data is associated with the relevant platform.
1. Within your Firestore project, go to IAM & Admin.
2. Go to Service Accounts and select Create service account. Then enter your required information here. The Service account name is required, the following steps are optional.
1. Click on your created service account. And at the top of the menu, select KEYS. Next, click on ADD KEY.
2. Create the Key by choosing JSON, and then click CREATE. A file will then be downloaded.
3. Go to your TAGGRS Dashboard.
4. Select Integrations --> Google Service Account.
Next, upload your JSON file and click Connect.
Now, Google Cloud Firestore is connected to TAGGRS and you can immediately start importing and analyzing your Firestore data.
1. In GTM Server, go to Templates → New under Variable Templates.
2. Import the Profit Tracking template from GitHub.
3. Ensure the path/permission in the template matches your Firestore collection ID.
1. In GTM Server, create a new variable using the imported template.
2. Set the GCP Project ID, Firestore Collection ID, and Value Field (e.g., "value").
In your Google Ads Conversion Tracking Tag and GA4 Configuration Tag (Server Container), set the conversion value parameter to the Profit Tracking variable.
Use GTM Preview mode to simulate a purchase and verify that profit data is sent correctly.
In Google Ads, add custom columns to analyze profit and net margin using your new conversion actions.
Yes, you can't connect to Firestore without a server, which means that you need server-side tracking to use Profit Tracking.
1. Create a collection (e.g. products).
2. For each product, add a document with the item ID and a field for profit value (e.g., value: profit).
1. In the TAGGRS dashboard, go to Integrations → Google Service Account.
2. Upload your JSON key and connect your Firestore project.