Skip to content

Commit

Permalink
Merge pull request #3 from dennisinteractive/27707_gtm_fix
Browse files Browse the repository at this point in the history
Case 27707; Fixed whitelist logic
  • Loading branch information
kalpaitch authored Apr 5, 2017
2 parents 200e3ac + e05530a commit c35fcfe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions includes/snippet.inc
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,12 @@ function _google_tag_data_layer_snippet() {
$classes = [];
$names = ['whitelist', 'blacklist'];
foreach ($names as $name) {
$$name = explode("\n", $$name);
if (empty($$name)) {
continue;
}
$$name = explode("\n", $$name);
$classes["gtm.$name"] = $$name;
}

if ($classes) {
// Build data layer snippet.
$script = "var $data_layer = [" . json_encode($classes) . '];';
Expand Down

0 comments on commit c35fcfe

Please sign in to comment.