Skip to content

Commit

Permalink
Merge pull request #256 from 4dn-dcic/impressions_count
Browse files Browse the repository at this point in the history
Fix Analytics Impressions for 200+ Items
  • Loading branch information
utku-ozturk authored May 27, 2024
2 parents 100c00f + 0dcb70d commit 24739f8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion es/components/util/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ export function impressionListOfItems(itemList) {
var href = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var listName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var context = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
if (!shouldTrack(itemList)) return false;
if (!shouldTrack(itemList)) return [];
context = context || state && state.reduxStore && state.reduxStore.getState().context || null;
var from = 0;
if (typeof href === 'string') {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hms-dbmi-bgm/shared-portal-components",
"version": "0.1.84",
"version": "0.1.85",
"description": "Shared components used for DBMI/BGM portal(s).",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/components/util/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ export function transformItemsToProducts(items, extData = {}){
* @returns {Object[]} Representation of what was sent.
*/
export function impressionListOfItems(itemList, href = null, listName = null, context = null){
if (!shouldTrack(itemList)) return false;
if (!shouldTrack(itemList)) return [];
context = context || (state && state.reduxStore && state.reduxStore.getState().context) || null;
var from = 0;
if (typeof href === 'string'){ // Convert to URL parts.
Expand Down

0 comments on commit 24739f8

Please sign in to comment.