Using the API

Getting started

Prerequisites

To query tagstack.io API, you will need:

Generate the API Key

You can generate an API key from your profile. Simply click the button "Generate API Key"

Please note that your API key must be kept secret

screenshot of an example profile page showing the button to generate the tagstack.io API token

Authentication

All requests to the tagstack.io API must include your API key as Bearer token in the Authorization header.

Ex: Authorization : Bearer $APIKEY

Scan a URL / Container ID

GET
/
v1
/
service.tagstack.io/api/scan?url=myurl.com

Scan provided url

Example: curl -H "authorization Bearer APIKEY" https://service.tagstack.io/api/scan?url=ads.google.com

Headers

Authorization - required

Your API Key for authentication. Value: Bearer $yourAPIKey

Parameters

url - required

The domain, subdomain or GTM container ID you want to scan. Examples: ads.google.com, GTM-KL36Q2B

Response

{
  "success": true,
  "containers": {
    "G-59LMG6TE50": {
      "entityType": "GA4 Stream"
    },
    "GTM-M2PH3M87": {
      "cmp": null,
      "consentMode": false,
      "entityType": "GTM Container",
      "ga4ServerSide": false
    }
  },
  "url": "https://www.googletagmanager.com/gtm.js?id=GTM-M2PH3M87"
}

© 2024 tagstack. tagstack is not affiliated with Google or Adobe, nor is it endorsed by or sponsored by this ones. This site was built using the astrosaas template, go check it.