Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@acpaas-ui/ngx-analytics
Advanced tools
This service adds an Angular layer on top of the Google Analytics `ga()` function.
This service adds an Angular layer on top of the Google Analytics ga()
function.
import { AnalyticsModule } from '@acpaas-ui/ngx-analytics';
Visit our documentation site for full how-to docs and guidelines
Method | Description |
---|---|
setDimension(key: string, value: string) | Send a custom dimension. More info on dimensions and its parameters can be found in the Google Analytics documentation. |
triggerPageView(title?: string, location?: string, page?: string) | Trigger a page view with optional custom parameters. More info on page tracking and its parameters can be found in the Google Analytics documentation. |
triggerEvent(category: string, action: string, label?: string, value?: any) | Trigger an event with optional custom parameters. Usually the category is the tagname of the element. More info on event tracking and its parameters can be found in the Google Analytics documentation. |
import { AnalyticsModule } from '@acpaas-ui/ngx-analytics';
@NgModule({
imports: [
AnalyticsModule
]
});
export class AppModule {};
By default there is a page trigger for each route change. To disable this feature for a specific route, add doNotTrack: true
to your route's data in app-routing.module.ts
.
{
path: 'home',
component: HomePage,
data: {
doNotTrack: true
}
}
import { GAService } from '@acpaas-ui/ngx-analytics';
constructor(
private gaService: GAService
) {}
this.gaService.setDimension('some-dimension', 'some-value');
Use default parameters:
this.gaService.triggerPageView();
Or use custom parameters:
this.gaService.triggerPageView('custom title', 'custom location', 'custom page');
Trigger an event from the controller:
this.gaService.triggerEvent('button', 'click');
Or trigger an event from the view with the gaEvent
directive. This directive sends a click event to GA with the tagname of the element as category, click as action, the inner text as label and the directive input as value.
Trigger event without value:
<button type="button" gaEvent>Switch gender to male with directive</button>
Trigger event with value:
<button type="button" [gaEvent]="activeGender">Switch gender to male with directive</button>
Visit our Contribution Guidelines for more information on how to contribute.
FAQs
This service adds an Angular layer on top of the Google Analytics `ga()` function.
The npm package @acpaas-ui/ngx-analytics receives a total of 0 weekly downloads. As such, @acpaas-ui/ngx-analytics popularity was classified as not popular.
We found that @acpaas-ui/ngx-analytics demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.