/Documentation

GTM Sandboxed API IntelliSense

Updated May 10, 2026

What is GTM Sandboxed API IntelliSense?

The challenge

How to integrate GTM Sandboxed API IntelliSense

Check whether the package managers for Node.js are installed

node -v npm -v
pnpm --version
Node.js and npm versions
pnpm install -D stape-gtm-api-types # or npm install --save-dev stape-gtm-api-types

Activate IntelliSense in your editor

Method 1: Triple-Slash Reference (File-by-File)

  1. 1.
/// <reference types="stape-gtm-api-types/web-gtm-sandboxed-apis" /> // Your GTM template code starts here... const copyFromDataLayer = require('copyFromDataLayer');
/// <reference types="stape-gtm-api-types/server-gtm-sandboxed-apis" /> // Your GTM template code starts here... const getAllEventData = require('getAllEventData');

Method 2: Using jsconfig.json (Project-Wide)

  1. 1.
{ "compilerOptions": { "paths": { "*": ["./node_modules/stape-gtm-api-types/web-gtm-sandboxed-apis"] } }, "include": ["**/*"] }
{ "compilerOptions": { "paths": { "*": ["./node_modules/stape-gtm-api-types/server-gtm-sandboxed-apis"] } }, "include": ["**/*"] }
npm update # or pnpm update

Start Coding

GTM Sandboxed API IntelliSense examples

Conclusion

Was this article helpful?

Comments

Can’t find what you are looking for?