<script>
window.portal={};window.portal.pageEventListeners={onLoad:(path)=>{if(path==='/quickstart'){//Changetextcontentoffirst<p>elementtosomething//else.(DOMmustbeloadedwhenonLoadiscalled)document.getElementsByTagName('p')[0].textContent='Welcome to the quick start! Be sure to send us your feedback.';//printacustommessagetotheconsoleeverysecondwhileuserison//quickstartpage.constinterval=window.setInterval(()=>console.log('Hello'),1000);returninterval;}returnundefined;},onUnload:(path,contextReturnedFromOnLoad)=>{if(contextReturnedFromOnLoad!=null){//Stopprintingcustommessagetoconsoleeverysecond.window.clearInterval(contextReturnedFromOnLoad)}},};
</script>
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-07。"],[[["\u003cp\u003eThis content provides guidance on adding custom JavaScript code to Apigee and Apigee hybrid portals for enhancing functionalities like integrating third-party tools or implementing cookie consent popups.\u003c/p\u003e\n"],["\u003cp\u003eCustom scripts can be added through the portal settings under the "Custom Scripts" tab, requiring proper enclosure within \u003ccode\u003e<script>\u003c/code\u003e tags to prevent display and security issues.\u003c/p\u003e\n"],["\u003cp\u003eScripts can be executed during page load (onLoad) or when navigating away from a page (onUnload) by defining functions within \u003ccode\u003eportal.pageEventListeners\u003c/code\u003e in the global namespace, allowing for dynamic content modification and cleanup activities.\u003c/p\u003e\n"],["\u003cp\u003eAvoid manipulating the DOM with custom scripts in order to prevent overriding or changing the built-in behaviors of the portal, however it can be used to integrate third-party services.\u003c/p\u003e\n"],["\u003cp\u003eExamples are given for executing custom scripts during JavaScript events and adding a cookie consent popup by using open source solutions like the Cookie Info Script.\u003c/p\u003e\n"]]],[],null,[]]