Skip to content

Commit c1fcbdf

Browse files
committed
added a decode
1 parent 5aafd13 commit c1fcbdf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Breinify.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@
182182
handleGetParameters: function () {
183183
var knownParams = {
184184
'brec': {
185-
'type': 'clickedRecommendation'
185+
'activity': {
186+
'type': 'clickedRecommendation'
187+
}
186188
}
187189
};
188190

@@ -232,13 +234,13 @@
232234
*/
233235
var user = combinedValue.user;
234236
var activity = combinedValue.activity;
235-
Breinify.activity(user, activity.type, activity.category, activity.description, activity.tags);
237+
Breinify.activity(user, activity.type, activity.category, activity.description, activity.tags, null, null);
236238
}
237239
},
238240

239241
parseGetParameter: function (name, value) {
240242
try {
241-
return JSON.parse(atob(value));
243+
return JSON.parse(atob(decodeURIComponent(value)));
242244
} catch (e) {
243245
return null;
244246
}

0 commit comments

Comments
 (0)