You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/includes/_utilities.md
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,30 +108,31 @@ This fetches the <a href="#page-event">Page Event object</a> for the current web
108
108
109
109
## API.utils.getUrlParams()
110
110
111
-
NOTE: This method returns immediately, not as a Promise, because the URL Params are already available and do not require asynchronous behavior.
111
+
> Usage:
112
+
113
+
```javascript
114
+
(function(WIAPI) {
115
+
varAPI=newWIAPI('test-integration'); // Note: Replace 'test-integration' with your actual integration identifier.
116
+
var urlParams =API.utils.getUrlParams(); // Returns the current URL parameters as object attributes, so you can easily access the values.
117
+
API.log(urlParams); // Log the entire object.
118
+
API.log(urlParams.query); // Access just the `query` parameter, for example.
119
+
})(window.DDC.API);
120
+
```
121
+
122
+
NOTE: This method returns synchronously, not as a Promise, because the URL Params are already available and do not require asynchronous behavior for performance.
0 commit comments