Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ The follow configuration settings are required and passed in to the 'setConfig'
- **##TEALIUM_ACCOUNT##** (String) Tealium iQ account
- **##TEALIUM_PROFILE##** (String) Tealium iQ profile
- **##TEALIUM_ENVIRONMENT##** (String) Tealium iQ environment ("dev", "qa", "prod")
- **##TEALIUM_CDN##** (String) Tealium iQ CDN-URL (optional, Default value is 'https://tags.tiqcdn.com/utag/')

```javascript
// The example in app.component.js shows how to configure
this.tealium.setConfig({ account: '##TEALIUM_ACCOUNT##', profile: '##TEALIUM_PROFILE##', environment: '##TEALIUM_ENVIRONMENT##' });
this.tealium.setConfig({ account: '##TEALIUM_ACCOUNT##', profile: '##TEALIUM_PROFILE##', environment: '##TEALIUM_ENVIRONMENT##', cdn: '##TEALIUM_CDN##' });
```

5 changes: 3 additions & 2 deletions example/src/app/tealium/utag.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ export class TealiumUtagService {
}

// Config settings used to build the path to the utag.js file
setConfig(config: {account: string, profile: string, environment: string}) {
setConfig(config: {account: string, profile: string, environment: string, cdn?: string}) {
config.cdn = config.cdn || 'https://tags.tiqcdn.com/utag/';
if ( config.account !== undefined && config.profile !== undefined && config.environment !== undefined ) {
this.scriptSrc = 'https://tags.tiqcdn.com/utag/' + config.account + '/' + config.profile + '/' + config.environment + '/utag.js';
this.scriptSrc = config.cdn + config.account + '/' + config.profile + '/' + config.environment + '/utag.js';
}
}

Expand Down