Using the API
Getting started
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
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"
}