Skip to content

Conversation

Jer1605
Copy link
Collaborator

@Jer1605 Jer1605 commented Jul 24, 2025

Overview

The Matomo Analytics Component by Edgee allows you to seamlessly send analytics events from your applications directly to Matomo via server-side requests at the edge.

This component is designed for developers who want to enhance user tracking and analytics accuracy while reducing the dependency on client-side SDKs and JavaScript trackers. It leverages Edgee’s edge computing platform to process and forward events with low latency and full privacy control.


🔑 Key Features & Benefits

Features

  • Server-Side Event Forwarding: Send page views, custom events, and user data directly to your Matomo instance from the edge
  • SDK-Free Tracking: Avoid adding heavy analytics SDKs to your frontend—no JS tracker required
  • Data Privacy & Compliance: By moving tracking to the server-side, you can better align with GDPR and other privacy regulations
  • Token-Based Access Control: Automatically include token_auth when needed to access restricted Matomo features
  • Context-Aware: Enrich events with client, session, campaign, and device context captured by Edgee

Benefits

  • More Reliable Analytics: Bypass ad blockers and JavaScript restrictions that prevent accurate tracking
  • Better Performance: Reduce frontend payload and latency by offloading tracking to the edge
  • Flexible & Customizable: Easily extend the logic for your specific tracking needs (e.g., custom variables, campaigns, ecommerce)
  • Works with Your Existing Matomo Instance: Integrates with any hosted Matomo setup, including Matomo Cloud

Use Cases

  • Website Analytics: Capture real-time page views and user journeys across your site
  • Custom Event Tracking: Track actions like form submissions, clicks, or product views without client JS
  • Authenticated User Tracking: Send user IDs or properties securely without exposing them in the frontend
  • Marketing Campaign Attribution: Pass campaign metadata (UTMs, source, medium, etc.) from Edgee context into Matomo

Additional Resources

for (k, v) in &track.properties {
match k.as_str() {
"category" => {
map.insert("e_c".to_string(), v.clone());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this going to overwrite the "track" added above?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexcasalboni yes :) to matomo, track is a required property, and it triggers errors if not defined. Thats why I added "Track" as default value, but it should be override if provided.

cvars.insert("client_model".into(), client.user_agent_model.clone());
}

if allow_sensitive {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please explain this logic? I was expecting no "sensitive" data to be provided if allow_sensitive is false 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexcasalboni Matomo restricts some fields like country, region, or city unless a token_auth is provided. When allow_sensitive is false, I fallback to storing them as custom variables (_cvar) instead. That way, we retain the data without violating Matomo's constraints.

Jer1605 and others added 7 commits August 4, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants