Hi Ashley, i've been working with a sample code, json:
{
"name": "Sample Add-in",
"supportEmail": "supportmail@support.com",
"version": "1.0",
"items": [
{
"url": "customPage.html",
"path": "ActivityLink",
"menuName": {
"en": "Custom Page"
}
}
],
"files": {
"customPage.html": "customPage.html"
}
}
--------------------------------------------------------------------------------------------------------------------------------------------------
HTML code to insert:
<!DOCTYPE html>
<html>
<head>
<title>Sample Geotab Add-In</title>
<script src="https://static.geotab.com/sdk/js/2/latest/geotab.js"></script>
<style>
body {
font-family: sans-serif;
padding: 20px;
}
#message {
margin-top: 20px;
font-weight: bold;
}
</style>
</head>
<body>
<div class="container">
<h1>Sample Geotab Add-In</h1>
<p>This add-in displays the current user's name.</p>
<div id="message"></div>
</div>
<script>
(function () {
geotab.addin.initialize(function (api, state, callback) {
api.getSession(function (session) {
if (session && session.userName) {
document.getElementById("message").textContent =
"Hello, " + session.userName + "!";
} else {
document.getElementById("message").textContent =
"Could not retrieve user information.";
}
callback();
});
});
})();
</script>
</body>
</html>