Skip to content

Commit

Permalink
fix: add gtag and update demo license
Browse files Browse the repository at this point in the history
  • Loading branch information
felixindrawan committed Sep 27, 2024
1 parent 815c5ae commit e869b0d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
26 changes: 26 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -386,5 +386,31 @@
<script src="./js/const.js"></script>
<script type="module" src="./js/init.js"></script>
<script type="module" src="./js/index.js"></script>
<!-- Google Tag Manager -->
<noscript>
<iframe
src="https://www.googletagmanager.com/ns.html?id=GTM-538F83"
height="0"
width="0"
style="display: none; visibility: hidden"
></iframe>
</noscript>
<script>
if (!navigator.webdriver) {
setTimeout(() => {
(function (w, d, s, l, i) {
w[l] = w[l] || [];
w[l].push({ "gtm.start": new Date().getTime(), event: "gtm.js" });
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s),
dl = l != "dataLayer" ? "&l=" + l : "";
j.async = true;
j.src = "//www.googletagmanager.com/gtm.js?id=" + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, "script", "dataLayer", "GTM-538F83");
}, 0);
}
</script>
<!-- End Google Tag Manager -->
</body>
</html>
4 changes: 3 additions & 1 deletion js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const pDataLoad = createPendingPromise();
/** LICENSE ALERT - README
* To use the library, you need to first specify a license key using the API "initLicense" as shown below.
*/
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
Dynamsoft.License.LicenseManager.initLicense(
"DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAwLTEwMzAwNjk2NyIsIm1haW5TZXJ2ZXJVUkwiOiJodHRwczovL21sdHMuZHluYW1zb2Z0LmNvbS8iLCJvcmdhbml6YXRpb25JRCI6IjIwMDAwMCIsInNlc3Npb25QYXNzd29yZCI6IkVUSHZVNlNPV3F3ZiIsInN0YW5kYnlTZXJ2ZXJVUkwiOiJodHRwczovL3NsdHMuZHluYW1zb2Z0LmNvbS8iLCJjaGVja0NvZGUiOjM5OTMzODU2Nn0="
);
/**
* You can visit https://www.dynamsoft.com/customer/license/trialLicense/?product=mrz&utm_source=docs&package=js to get your own trial license good for 30 days.
* Note that if you downloaded this sample from Dynamsoft while logged in, the above license key may already be your own 30-day trial license.
Expand Down

0 comments on commit e869b0d

Please sign in to comment.