on 08-30-2021 10:10 AM
Hey, I'm trying to set up SAP Web Analytics in my Launchpad Service via Shell Plugin.
Therefore I used this two guides:
Developing a Shell Plugin for SAP Fiori Launchpad Service on SAP BTP (Multi-Cloud Environment) with ...
Tracking Portal site & App usage via SAP Web Analytics in SAP Cloud Platform | SAP Blog
After adding the Shell Script to my "Everyone" Group in the Content Manager I open the Launchpad but nothing is happening. When viewing the browser console it shows this error:
"Mandatory init() not called for UIComponent: 'fin.central.user.defaultparameter'. This is likely caused by a missing super call in the component's init implementation."
I can't spot an error in my "Component.js" so maybe the error is somewhere else? Anyway this is my code:
sap.ui.define([
"sap/ui/core/UIComponent",
"sap/ui/Device",
"fss/fioriscript/model/models"
], function (UIComponent, Device, models) {
"use strict";
return UIComponent.extend("fss.fioriscript.Component", {
metadata: {
manifest: "json"
},
/**
* The component is initialized by UI5 automatically during the startup of the app and calls the init method once.
* @public
* @override
*/
init: function () {
//set new ui component
sap.ui.component( {name: "fss.fioriscript.Component" } )
var rendererPromise = this._getRenderer();
window.swa = {
pubToken: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
baseUrl: "https://events.web-analytics.cfapps.eu10.hana.ondemand.com/tracker/",
loggingEnabled: true
};
this.loadTracker();
},
loadTracker: function () {
(
function () {
var d = document,
g = d.createElement('script'),
s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g.defer = true;
g.async = true;
g.src = window.swa.baseUrl + 'js/track.js';
s.parentNode.insertBefore(g, s);
if ((typeof sap !== "undefined" || typeof sap.ui !== "undefined") && sap.ui.version >= "1.65.0") {
//no need to track Hash change, as Router event is listened
} else {
window.onhashchange = function () {
window.swa.trackLoad();
};
}
})();
},
});
});
Hey all,
I just recreated the project and added an empty getRenderer function:
_getRenderer: function() {}
Now it is working fine!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Simon,
Did you find the solution on why you are getting that error ?
Regards,
Abhinay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
11 | |
8 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.