ngx-tag-commander's People
ngx-tag-commander's Issues
Object(...) is not a function
Hi,
I read in your README that you support AngularX 2+.
I would like to use your plugin for my ionic 3 project based on Angular 5. But I have the following error message:
Object(...) is not a function
I created two empty projects, one on Angular 5 and one on Angular 7. The first one didn't work when I imported TagCommanderModule
in AppModule.ts
, but the second one was okay. I suppose that is an issue with previous versions
Thank for your help
ERROR TypeError: Cannot read properties of undefined (reading 'Tracker')
Sometimes, when refreshing a page, I get following error when calling captureEvent() function :
ERROR TypeError: Cannot read properties of undefined (reading 'Tracker')
at Function.executeTag102_4482_20 (tag_commander.js:135)
at Array.<anonymous> (tag_commander.js:11)
at Object.tC.event.click (tag_commander.js:11)
at TagCommanderService.captureEvent (tag-commander.service.ts:221)
Refering to the code : var ATevent=new window.ATInternet.Tracker.Tag();
Only fix is to start a new tab to get a clean tagcommander..
Using tagcommander 1.3.0 / Angular 11
Trackroute and lazyloading = double reload
Hi,
I start the implementation of this plugin but I notice some strange behaviour.
I use lazy loading but I think it's the same for classic loading.
I have route configured like that :
app-routing
const routes: Routes = [
{
path: 'foo',
loadChildren: () =>
import('./core/bar.module').then(
(m: { BarModule: any }) => m.BarModule
)
}];
@NgModule({
imports: [
RouterModule.forRoot(routes, { scrollPositionRestoration: 'enabled' }),
],
exports: [RouterModule],
declarations: [],
})
export class AppRoutingModule {}
And bar-routing
const routes: Routes = [
{
path: '',
component: BarComponent,
},
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class NaviresRoutingModule {}
If i put the data > tcInclude at app-routing module the reload container is fired twice.
If i put it at bar-routing module, lowest route, it's good, fired only once.
I guess it's because ActivationEnd
seems to be trigerred each "sub-route"
Problem with trackRoute
When we set trackRoute to True, we have an error
Cannot read property 'forEach' of undefined
When i look code is see this
this.router.events.subscribe(function (_data) { if (_data instanceof RoutesRecognized && _this._trackRoutes) { if (_data.state.root.firstChild.data.tcInclude === undefined) { /** @type {?} */ var data = _data.state.root.firstChild.data.tcInclude; data.forEach(function (container) { _this.reloadContainer(container["ids"], container["idc"], container["options"]); }); } } });
i think have misstake, you mean if var is not undefined right ?
Trigger Event with Directives [it isn't a known property]
Hi,
I've already installed the library and it looks very good, setTcsVars works fine, but when I try to capture events with DIRECTIVES this error appears:
- "Can't bind to 'tcEventLabel' since it isn't a known property'" (i'm trying to attach it to buttons, like below).
- "Can't bind to 'tcEvent' since it isn't a known property'" (i'm trying to attach it to buttons, like below).
- "Can't bind to 'tcEventObj' since it isn't a known property'" (i'm trying to attach it to buttons, like below).
I also import the Module in my app.module.ts as Documentation said, in fact setTcVars (for example) works as excepted but directives not.
<button class="button" type="submit" (click)="formSubmit()" [tcEvent]="'RECALL'" [tcEventLabel]="'RECALL'" [tcEventObj]="{text: 'string'}"> TEST </button>
If I try the first method, putting captureEvent function, I don't know how to pass element (id? class? tag name? idk), Docs say let element = 'button' but if I do this it takes all buttons in the view.
Thank you very much for your time,
best regards Alessio.
Replace usage of document to support server-side-rendering
Hi There,
We are using the ngx-tag-commander within an angular application, which uses Server Side Rendering. When the function TagCommanderService.addContainer
is getting called during an SSR rendering cycle, the following exception happens:
ReferenceError: document is not defined
at TagCommanderService.addContainer (/Users/jwidmer/projects/conforama/workspace/js-storefront/conforama-storefront/dist/conforama-storefront-server/main.js:240428:28)
at TagCommanderModule.setupTracking (/Users/jwidmer/projects/conforama/workspace/js-storefront/conforama-storefront/dist/conforama-storefront-server/main.js:109768:34)
at new TagCommanderModule (/Users/jwidmer/projects/conforama/workspace/js-storefront/conforama-storefront/dist/conforama-storefront-server/main.js:109764:14)
at Object.TagCommanderModule_Factory [as factory] (/Users/jwidmer/projects/conforama/workspace/js-storefront/conforama-storefront/dist/conforama-storefront-server/main.js:109788:149)
at R3Injector.hydrate (/Users/jwidmer/projects/conforama/workspace/js-storefront/conforama-storefront/dist/conforama-storefront-server/main.js:155775:35)
Instead of document.createElement('script')
, maybe the following could used: this.winRef.nativeWindow.document.createElement('script')
?
Angular 14
Can we expect a version of the lib migrated to angular 14?
Any NPM Repo ?
Hi,
Is there any NPM Repo for this library ?
Thanks.
Hash error when running with node > 16
Hello,
I encountered an error when running the project with node >16 (on debian environment).
Reproducing:
npm install;
npm run start;
Tried with versions ( ✅= success, ❌= fail):
- node 14.7.0 => ✅
- node 15.14.0 => ✅
- node 16.20.2 => ✅
- node 17.9.1 => ❌
- node 18.19.0 => ❌
- node 21.1.0 => ❌
Full stack:
[email protected] start
ng serve --open
Node.js version v17.9.1 detected.
Odd numbered Node.js versions will not enter LTS status and should not be used for production. For more information, please see https://nodejs.org/en/about/releases/.
⠋ Generating browser application bundles (phase: setup)...Compiling @angular/core : es2015 as esm2015
Compiling @angular/common : es2015 as esm2015
Compiling @angular/platform-browser : es2015 as esm2015
Compiling @angular/router : es2015 as esm2015
Compiling @angular/platform-browser-dynamic : es2015 as esm2015
⠙ Generating browser application bundles (phase: building)...node:internal/crypto/hash:67
this[kHandle] = new _Hash(algorithm, xofLen);
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:135:10)
at BulkUpdateDecorator.hashFactory (/home/ym/ngx-tag-commander/node_modules/webpack/lib/util/createHash.js:145:18)
at BulkUpdateDecorator.update (/home/ym/ngx-tag-commander/node_modules/webpack/lib/util/createHash.js:46:50)
at SourceMapSource.updateHash (/home/ym/ngx-tag-commander/node_modules/webpack/node_modules/webpack-sources/lib/SourceMapSource.js:231:8)
at NormalModule._initBuildHash (/home/ym/ngx-tag-commander/node_modules/webpack/lib/NormalModule.js:880:17)
at handleParseResult (/home/ym/ngx-tag-commander/node_modules/webpack/lib/NormalModule.js:946:10)
at /home/ym/ngx-tag-commander/node_modules/webpack/lib/NormalModule.js:1040:4
at processResult (/home/ym/ngx-tag-commander/node_modules/webpack/lib/NormalModule.js:755:11)
at /home/ym/ngx-tag-commander/node_modules/webpack/lib/NormalModule.js:819:5 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v17.9.1
Process finished with exit code 1
Ivy Distribution for later Angular versions
Hi,
Do you plan to release an Ivy Distribution of this library for the later versions of Angular (e.g. Angular 13)?
Thanks,
Rebecca
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.