cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

I set up bookmark functionalities and tried leveraging the "isDefault" flag as shown here in the Analytics Designer API Reference Guide.

However a "default" bookmark does not load when opening the application.

When loading the "default" bookmark in the "OnInitialization" Script, the Application goes into a loop as it's initializing again when applying the bookmark.

So my Question is: How was the default bookmark intended to work ?

0 Likes
View Entire Topic
mightz
Explorer
0 Likes

Hey ,

I have solved it like this:

var bookmarks = BookmarkSet_UserSettings.getAll();

if ((BookmarkSet_UserSettings.getAppliedBookmark() === undefined) && (bookmarks.length > 0)) {
	
		for (var i=0; i<bookmarks.length; i++) {

		if (bookmarks[i].isDefault === true) {
			BookmarkSet_UserSettings.apply(bookmarks[i]);
		}
	}
}

one bad thing is, that application will be loaded twice..not a really nice work around.

Another solution would be to share a link with "bookmarkId=DEFAULT" inside, but then only this link will work as expected.