
Add Project from Template
Choose FIORI Plugin
Provide Project Name
Step 4 : Give Plugin ID as com.companyname.ga and Click on FINISH
Give Plugin ID
// Load Google Analytics asynchronously
// Tracker ID will G-XXXXXXXX
(function (GA_TRACKING_ID) {
const script = document.createElement('script');
script.src = `https://www.googletagmanager.com/gtag/js?id=${GA_TRACKING_ID}`;
script.async = true;
document.head.appendChild(script);
})('G-XXXXXXXX'); // Your Tracker ID will G-XXXXXXXX
sap.ui.define([
"sap/ui/core/Component"
], function (Component) {
return Component.extend("com.companyname.ga.Component", {
metadata: {
"manifest": "json"
},
init: function () {
window.dataLayer = window.dataLayer || [];
function gtag() {
window.dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXX'); // Your Google Tag
}
});
});
Deploy to Gateway System
Create a Tile Target Mapping
Create a Tile
Results on Activity in FIORI Launchpad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
10 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |