Google Tag Manager - Lodash Syntax Incorrect

samsherwood
10
samsherwood
commented 3 years ago

When translating the template for the Google Tag Manager module, lodash does not pick up the options passed into the module, due to the formatting being incorrect on the plugin.

For instance:
'<%= options.layer ?>'

Should be:
'<%= options.layer %>'

bug
0
pi0
39.8k
pi0
commented 3 years ago

@samsherwood Thanks for report. Actually we need more tests on this module. Feel free opening PR for fixes.

0
samsherwood
10
samsherwood
commented 3 years ago

Noted! Right now, not 100% sure that's the only issue, as my build did not end up adding in the options are the template was updated. Just ended up being an empty string.

0
pi0
39.8k
pi0
commented 3 years ago

Meanwhile for testing you can easily copy/paste module files into your project modules directory and require using ~/modules/google-tag-manager :)

0
samsherwood
10
samsherwood
commented 3 years ago

Much appreciated! Wasn't sure what convention to follow in that regard.

0
samsherwood
10
samsherwood
commented 3 years ago

Found the other issue in the index.js -- options are being passed as 'currentOptions' which then is not expected by the template engine. Where the 'addPlugin' occurs, need to assign currentOptions to options.

0
pi0
39.8k
pi0
commented 3 years ago

new version published

1
Informations
Bug Report โ€ข Open
#c19 - Created 3 years ago