Skip to content
Report library
Purpose / Other

Analytics Skill Security Audit

What the author says it does (original text)

When the user wants to set up, improve, or audit analytics tracking and measurement. Also use when the user mentions "set up tracking," "GA4," "Google Analytics," "conversion tracking," "event tracking," "UTM parameters," "tag manager," "GTM," "analytics implementation," "tracking plan," "how do I measure this," "track conversions," "Mixpanel," "Segment," "are my events firing," or "analytics isn'

Independent security check

Security risks found

Files checked
5
Risks found
3
Could it run dangerous commands?Looks for programs run straight after downloading, remote control of your computer, and hidden commands.Risks found: 1
Medium risk

Custom HTML on “All Pages” loads and executes remote JavaScript from Meta

Source references: 4
What we found

The GTM example creates a Custom HTML tag that dynamically loads a script from connect.facebook.net and assigns an All Pages trigger. That script runs in the site’s page context; its behavior depends on the remote response and on who can publish the GTM container.

Why this matters

Once deployed, third-party code runs and sends PageView on every matching page. A misconfigured or compromised GTM account or remote script could affect all visitor pages and data accessible to the browser.

This is an example GTM configuration, not code the Skill itself executes. If a user copies and publishes it, however, it loads remote JavaScript from Meta on every page and sends a PageView. The remote script runs in the site’s page context, may disclose visit data to Meta, and its future content is controlled remotely. A user can ask the author to document the consent category, transmitted fields, and scope, and restrict firing to necessary pages after marketing consent.

references/gtm-implementation.md:225In the instructionsOpen original file
### Facebook Pixel - Base**Tag Type:** Custom HTML```html<script>  !function(f,b,e,v,n,t,s)  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?  n.callMethod.apply(n,arguments):n.queue.push(arguments)};  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';  n.queue=[];t=b.createElement(e);t.async=!0;  t.src=v;s=b.getElementsByTagName(e)[0];  s.parentNode.insertBefore(t,s)}(window, document,'script',  'https://connect.facebook.net/en_US/fbevents.js');  fbq('init', 'YOUR_PIXEL_ID');  fbq('track', 'PageView');</script>
Show 3 other places
references/gtm-implementation.md:241In the instructionsOpen original file
  fbq('track', 'PageView');</script>```**Trigger:** All Pages
references/gtm-implementation.md:235In the instructionsOpen original file
  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';  n.queue=[];t=b.createElement(e);t.async=!0;  t.src=v;s=b.getElementsByTagName(e)[0];  s.parentNode.insertBefore(t,s)}(window, document,'script',  'https://connect.facebook.net/en_US/fbevents.js');  fbq('init', 'YOUR_PIXEL_ID');  fbq('track', 'PageView');</script>
references/gtm-implementation.md:244In the instructionsOpen original file
**Trigger:** All Pages
Could it expose your files or keys?Looks for uploads of files containing passwords or keys, and keys written directly in the code.Risks found: 2
Medium risk

The consent example combines analytics and advertising approval into one action

Source references: 3
What we found

The default denies both analytics_storage and ad_storage, but grantConsent() grants both together. It does not show separate handling for analytics and advertising choices, while also stating that tags respect the consent state automatically.

Why this matters

A visitor who agrees only to product analytics could still have advertising storage and marketing tags such as Facebook Pixel enabled, allowing behavioral data to be used for advertising or remarketing beyond that choice.

This is a consent-mode example and does not run by itself. If adopted unchanged, one grantConsent() call enables both analytics and advertising storage, so it cannot represent a user accepting analytics while rejecting advertising. The later claim that tags respect consent does not fix the merged choice because the consent state itself was jointly granted. A user can require separate mappings for analytics and marketing choices and block each tag category until its own consent is given.

references/gtm-implementation.md:327In the instructionsOpen original file
```javascript// Default state (before consent)gtag('consent', 'default', {  'analytics_storage': 'denied',  'ad_storage': 'denied'});// Update on consentfunction grantConsent() {  gtag('consent', 'update', {    'analytics_storage': 'granted',    'ad_storage': 'granted'  });}```
Show 2 other places
references/gtm-implementation.md:343In the instructionsOpen original file
### GTM Consent Overview1. Enable Consent Overview in Admin2. Configure consent for each tag3. Tags respect consent state automatically
references/gtm-implementation.md:246In the instructionsOpen original file
### Facebook Pixel - Event**Tag Type:** Custom HTML```html<script>  fbq('track', 'Lead', {    content_name: '{{DL - form_name}}'  });</script>```**Trigger:** Custom Event - form_submitted
Medium risk

Examples read a user_id cookie and support sending user identifiers to GA4

Source references: 5
What we found

An advanced GTM example extracts user_id from document.cookie, while other examples place user_id into the data layer, GA4 configuration, and tag parameters. Although the main document says to avoid PII, it does not require a random internal identifier or prohibit email addresses, account names, or other directly identifying values in this field.

Why this matters

If the real cookie directly identifies a person, their activity may be disclosed to analytics services and linked across sessions, increasing exposure from leaks, mistaken sharing, and privacy noncompliance.

These are separate implementation examples, not an automatically executing data-theft flow. If combined, however, a GTM variable can read a site-accessible user_id cookie, while the GA4 example explicitly supports sending user_id. If that cookie contains an email, username, or another direct identifier, identity data could be disclosed to the analytics provider. The main document only generally says to avoid PII and does not define how the ID must be generated. A user can require a non-directly-identifying, rotatable internal ID and verify the actual cookie, dataLayer, and GA4 values.

references/gtm-implementation.md:379In the instructionsOpen original file
// Get cookie valuefunction() {  var match = document.cookie.match('(^|;) ?user_id=([^;]*)(;|$)');  return match ? match[2] : null;}
Show 4 other places
references/ga4-implementation.md:88In the instructionsOpen original file
// User ID (for logged-in users)gtag('config', 'GA_MEASUREMENT_ID', {  'user_id': 'USER_ID'});```
references/ga4-implementation.md:104In the instructionsOpen original file
// Set user propertiesdataLayer.push({  'user_id': '12345',  'user_type': 'premium'});
references/gtm-implementation.md:214In the instructionsOpen original file
### GA4 Event Tag**Tag Type:** Google Analytics: GA4 Event**Settings:**- Configuration Tag: Select your config tag- Event Name: {{DL - event_name}} or hardcode- Event Parameters: Add parameters from dataLayer**Trigger:** Custom Event with event name match
SKILL.md:127In the instructionsOpen original file
### Best Practices- Use consistent property names- Include relevant context- Don't duplicate automatic properties- Avoid PII in properties
Could it delete files or keep running?Looks for broad file deletion, disk overwrites, and programs set to start automatically.No risks found
Could it bypass safety checks?Looks for skipped website security checks, excessive file access, or actions that skip your approval.No risks found
Could it mislead the AI or hide text?Checks the skill instructions for requests to ignore you, influence the report, or hide text in invisible characters.No risks found
Could it change links or payment recipients without asking?Looks for forced referral or payment changes combined with instructions to hide the change.No risks found

Inside this skill

8 instruction sections

This Skill plans, implements, and troubleshoots analytics using GA4, GTM, and related tools, and asks for business decisions, existing tools, technical context, and privacy requirements first.

View source
SKILL.md:17In the instructionsOpen original file
Before implementing tracking, understand:1. **Business Context** - What decisions will this data inform? What are key conversions?2. **Current State** - What tracking exists? What tools are in use?3. **Technical Context** - What's the tech stack? Any privacy/compliance requirements?

It first reads a product-marketing context file from the project when present and uses that information to avoid repeat questions. The supplied material does not instruct sending that file to an external service.

View source
SKILL.md:14In the instructionsOpen original file
**Check for product marketing context first:**If `.agents/product-marketing.md` exists (or `.claude/product-marketing.md`, or the legacy `product-marketing-context.md` filename, in older setups), read it before asking questions. Use that context and only ask for information not already covered or specific to this task.

The Skill provides configuration guidance for events, conversions, user properties, and advertising audiences. Collection or external transmission occurs only if a user deploys these examples to a site and connected accounts.

View source
references/ga4-implementation.md:82In the instructionsOpen original file
// User propertiesgtag('set', 'user_properties', {  'user_type': 'premium',  'plan_name': 'pro'});// User ID (for logged-in users)gtag('config', 'GA_MEASUREMENT_ID', {  'user_id': 'USER_ID'});```
references/ga4-implementation.md:287In the instructionsOpen original file
## Integration with Google Ads### Linking1. Admin > Product links > Google Ads links2. Enable auto-tagging in Google Ads3. Import conversions in Google Ads### Audience ExportAudiences created in GA4 can be used in Google Ads for:- Remarketing campaigns- Customer match- Similar audiences

The documentation explicitly calls for avoiding PII, waiting for consent, limiting collection, and defaulting analytics and advertising storage to denied in its Consent Mode example.

View source
SKILL.md:231In the instructionsOpen original file
## Privacy and Compliance### Considerations- Cookie consent required in EU/UK/CA- No PII in analytics properties- Data retention settings- User deletion capabilities### Implementation- Use consent mode (wait for consent)- IP anonymization- Only collect what you need- Integrate with consent management platform
references/gtm-implementation.md:327In the instructionsOpen original file
```javascript// Default state (before consent)gtag('consent', 'default', {  'analytics_storage': 'denied',  'ad_storage': 'denied'});
Start here · InstructionsSKILL.md
analytics
Lines connect the instruction file to its sections, not an observed execution order. Select a section to read the source. 7 more sections are available in the original file.

File reference map

References: 3
Files making referencesReferenced content
Lines show actual file references, not execution order. Select a node to highlight its connections and inspect the files and source locations. Dashed lines include files that still need locating.
Files and check records5 files

Coverage and gaps

Content covered in each file

These are the source ranges included in this check, not a guarantee that every issue has been resolved.

  • SKILL.mdFull text included
  • references/event-library.mdFull text included
  • references/ga4-implementation.mdFull text included
  • references/gtm-implementation.mdFull text included
  • evals/evals.jsonFull text included

This report is for the version above. We read the available code and instructions without running the skill or checking extra packages it installs. This is not a promise of safety: a different version or setup may behave differently.

  • SKILL.mdInstructions
  • evals/evals.jsonSupporting file
  • references/event-library.mdSupporting file
  • references/ga4-implementation.mdSupporting file
  • references/gtm-implementation.mdSupporting file

Operations mentioned in code and instructions

Connect to websites
references/event-library.md:207In the instructionsOpen original file
page: "/pricing"referrer: "https://google.com"```
references/ga4-implementation.md:55In the instructionsOpen original file
Reference: https://support.google.com/analytics/answer/9267735
references/gtm-implementation.md:238In the instructionsOpen original file
  s.parentNode.insertBefore(t,s)}(window, document,'script',  'https://connect.facebook.net/en_US/fbevents.js');  fbq('init', 'YOUR_PIXEL_ID');
Lines read
1,355
File checksum (to compare versions)
abfc89c24f2ed3ed302941195ef167c27436597307e8d94f59847d1bbf60c10b