Comments (3)
List of Event Triggers available in my Matomo Instance's Tag Manager:
Clicks
- All Download Clicks (left, middle or right click)
- All Element Clicks (left, middle or right click)
- All Link Clicks (left, midlle or right click)
Pageviews
- DOM Ready
- PageView
- Window Loaded
User engagement
- Element Visibility (when a specific element becomes visible)
- Form Submit (when any form is sumbitted)
- Full screen (when window goes or leaves full screen)
- History Change (when the current url changes)
- Scroll Reach (when a certain scroll position is reached)
- User Interaction (configurable touche, move, scroll or mouse click event)
- Window Leave ("about to leave", when user mouse moves outside the window)
- Window Unload (just before the window is closed or user navigates to different page)
Others
- Custom Event
- JS Error (when a js error happens)
- Timer (on a specific interval)
I imagine most of these could be thought of check-boxes in the builder UI on the respective components, something like "Enable Tracking".
from builder.
Here is a real live Matomo Tag Manager script
https://gist.github.com/blaggacao/fc8d33f7ba46ba4fa30e533146a114dd
I think the beauty of having this integrated into builder
is that a lot of the bolt-on trigger logic won't be necessary because those triggers can just be included into the page source where ever it is desired. Server side push to Conversion APIs and others also makes the overhead of having external tool's client side procsessing obsolete. That is: instead of installing a Facebook Pixel tag, one would simply feed the data kraken server-to-server, directly from the back end (just as modern Google Tag Manager does in a cookieless [third-party] 2024 world).
What's a bit more interesting are the variables and internal data structures used. They might give us some clues as to what is UI configurable in matomo tag manager and what is actually tracked:
In a bit I'll be able to assess how Facebook Pixel plays into this to extract the exact correlation mechanism on how incoming platforms would express a "Click ID" or capture a "User Identity" [Possibly the finger-printed visitor ID is actually enough for most conversion APIs if enriched with some back-end user data such as email, address or IP]) 🤷
window.MatomoTagManager.addContainer({
"id": "fff...",
"idsite": 1,
"versionName": "",
"revision": 0,
"environment": "live",
"tags": [{
"id": 1,
"type": "Matomo",
"name": "fff......",
"parameters": {
"matomoConfig": {
"name": "Matomo Configuration",
"type": "MatomoConfiguration",
"lookUpTable": [],
"defaultValue": "",
"parameters": {
"matomoUrl": "https:\/\/foobar.matomo.cloud",
"idSite": 1,
"enableLinkTracking": true,
"enableFormAnalytics": true,
"enableMediaAnalytics": true,
"enableFileTracking": false,
"enableCrossDomainLinking": false,
"crossDomainLinkingTimeout": "180",
"enableDoNotTrack": false,
"disablePerformanceTracking": false,
"enableJSErrorTracking": false,
"enableHeartBeatTimer": false,
"heartBeatTime": "15",
"trackAllContentImpressions": false,
"trackVisibleContentImpressions": false,
"disableCookies": false,
"requireConsent": false,
"requireCookieConsent": false,
"customCookieTimeOutEnable": false,
"customCookieTimeOut": "393",
"referralCookieTimeOut": "182",
"sessionCookieTimeOut": "30",
"setSecureCookie": false,
"cookieDomain": "",
"cookieNamePrefix": "_pk_",
"cookiePath": "",
"cookieSameSite": "Lax",
"disableBrowserFeatureDetection": false,
"domains": [],
"alwaysUseSendBeacon": false,
"disableAlwaysUseSendBeacon": false,
"userId": "",
"customDimensions": [],
"registerAsDefaultTracker": true,
"bundleTracker": true,
"jsEndpoint": "matomo.js",
"jsEndpointCustom": "custom.js",
"trackingEndpoint": "matomo.php",
"trackingEndpointCustom": "custom.php",
"appendToTrackingUrl": "",
"forceRequestMethod": false,
"requestMethod": "GET",
"requestContentType": "application\/x-www-form-urlencoded; charset=UTF-8",
"customRequestProcessing": ""
},
"Variable": "MatomoConfigurationVariable"
},
"trackingType": "pageview",
"idGoal": "",
"goalCustomRevenue": "",
"documentTitle": "",
"customUrl": "",
"isEcommerceView": false,
"productSKU": "",
"productName": "",
"categoryName": "",
"price": "",
"eventCategory": "",
"eventAction": "",
"eventName": "",
"eventValue": ""
},
"blockTriggerIds": [],
"fireTriggerIds": [1],
"fireLimit": "unlimited",
"fireDelay": 0,
"startDate": null,
"endDate": null,
"Tag": "MatomoTag"
}],
"triggers": [{
"id": 1,
"type": "PageView",
"name": "PageView",
"parameters": [],
"conditions": [],
"Trigger": "PageViewTrigger"
}],
"variables": [{
"name": "MatomoConfiguration",
"type": "MatomoConfiguration",
"lookUpTable": [],
"defaultValue": "",
"parameters": {
"matomoUrl": "https:\/\/foobar.matomo.cloud",
"idSite": 1,
"enableLinkTracking": true,
"enableFormAnalytics": true,
"enableMediaAnalytics": true,
"enableFileTracking": false,
"enableCrossDomainLinking": false,
"crossDomainLinkingTimeout": "180",
"enableDoNotTrack": false,
"disablePerformanceTracking": false,
"enableJSErrorTracking": false,
"enableHeartBeatTimer": false,
"heartBeatTime": "15",
"trackAllContentImpressions": false,
"trackVisibleContentImpressions": false,
"disableCookies": false,
"requireConsent": false,
"requireCookieConsent": false,
"customCookieTimeOutEnable": false,
"customCookieTimeOut": "393",
"referralCookieTimeOut": "182",
"sessionCookieTimeOut": "30",
"setSecureCookie": false,
"cookieDomain": "",
"cookieNamePrefix": "_pk_",
"cookiePath": "",
"cookieSameSite": "Lax",
"disableBrowserFeatureDetection": false,
"domains": [],
"alwaysUseSendBeacon": false,
"disableAlwaysUseSendBeacon": false,
"userId": "",
"customDimensions": [],
"registerAsDefaultTracker": true,
"bundleTracker": true,
"jsEndpoint": "matomo.js",
"jsEndpointCustom": "custom.js",
"trackingEndpoint": "matomo.php",
"trackingEndpointCustom": "custom.php",
"appendToTrackingUrl": "",
"forceRequestMethod": false,
"requestMethod": "GET",
"requestContentType": "application\/x-www-form-urlencoded; charset=UTF-8",
"customRequestProcessing": ""
},
"Variable": "MatomoConfigurationVariable"
}]
}, Templates);
from builder.
List of Variales from Matomo.
They are kind of the the "building blocks" for marketeer's programming via the "Tag Manager UI". As a developer, I understand that they are pretty much equivalent to the injection of a let foo = ...;
block, just via UI.
But seeing the list might give an idea what type of tracking is actually needed (surely nobody needs the implementation a whole UI based programming language — which is what Tag Managers seem to be).
Time
- Time since pageload
Page Variables
- Custom JS (eureka!)
- DOM Element - gets value from dom element
- Data Layer - afaiu a fancy handle on
localStorage
- First Party Coockie - reads from a cookie
- Referrer URL
- URL Parameter - a specific param
- URL Variable - current page url
SEO
- Page Meta Content - reads from
meta
tags
Utilities
- Constants
Others
- Custom Request processing function
- Matomo config (what you see above: configures the matomo analytics tracker)
I think all of these can be simply subsumed by injecting a custom tracking function into frappe.fel
:
frappe.fel = (event_name) => ...;
// could become
frappe.fel = {% my_injected_tracker_function %} => (event_name, data) => ... /* continue with the default */;
In the Facebook case, I would want to extract the Facebook Click ID from the query parameter and make sure it's pushed as data
payload. That's it. The backend facebook integration would then have to extract that freeform data from all events when talking to facebook conversion api. Simple.
Edit
I prototyped this in frappe/frappe@42e0280
from builder.
Related Issues (20)
- feature-request: Add Custom HTML Block Embed Feature in Frappe Builder HOT 1
- Bug: HTML Attributes inside components don't get inserted HOT 3
- Bug. resizing the left element tree bar is not possible HOT 3
- woocommerce settings "In List View" is not allowed for Attach Image type in row 16 When I press enable synchronization I get this error help I need to sync my store I have erpnext v13 HOT 3
- feat: datatables! HOT 1
- Hiding parent container doesn't hide child element HOT 1
- Show users and what they are editing like figma HOT 1
- Detach components if pasted from another domain HOT 1
- Improving UX for font color formatting HOT 1
- (deleted issue)
- There seems to be no DOCTYPE! declaration HOT 3
- Bug: Data loss HOT 2
- Cannot Access Builder on Fresh Install HOT 2
- Issue: Make preview images of builder pages private and only store latest version HOT 1
- Max width not applied to child container
- Input element required true not set
- Issue: Not able to duplicate builder component in frappe app HOT 2
- Feat: Add more page options to toolbar to increase productivity
- MJML support? HOT 1
- I tried Installing Builder but this error comes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from builder.