-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
152 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Node.js Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- run: npm ci | ||
- run: npm test | ||
|
||
publish-gpr: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
registry-url: https://npm.pkg.github.com/ | ||
- run: npm ci | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@VeXHarbinger:registry=https://npm.pkg.github.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Blazor extensions for Analytics. | ||
Supported platforms: Google Analytics, Google Tag Manager, and FaceBook Pixel. | ||
|
||
|
||
# What is Blazor Analytics and what can it do for me? | ||
|
||
# First Credit where Credit is Due | ||
All the hard work was done by [welisonmenezes](https://github.com/welisonmenezes) in his [blazor-universal-analytics](https://github.com/welisonmenezes/blazor-universal-analytics) repository. | ||
|
||
|
||
# Configuration | ||
* Install Nuget | ||
* Import the namespaces in _Imports.razor | ||
* In your StartUp/Program.cs | ||
* Register the service builder.Services.AddBUA(null, null, null); | ||
|
||
|
||
@using BlazorAnalytics | ||
|
||
|
||
|
||
Inside your main Startup/Program, call AddBlazorAnalytics. This will configure your GTAG_ID automatically. | ||
|
||
|
||
builder.Services.AddBlazorAnalytics("YOUR_GTAG_ID", "YOUR_FBPIXEL_ID", null); | ||
|
||
|
||
# Blazor Analytics | ||
[![Build Status](https://VeXHarbinger.visualstudio.com/BlazorAnalytics/_apis/build/status/VeXHarbinger.BlazorAnalytics?branchName=master)](https://VeXHarbinger.visualstudio.com/BlazorAnalytics/_build/latest?definitionId=1&branchName=master) | ||
[![GitHub Issues](https://img.shields.io/github/issues/VeXHarbinger/BlazorAnalytics.svg)](https://github.com/VeXHarbinger/BlazorAnalytics/issues) | ||
[![GitHub Stars](https://img.shields.io/github/stars/VeXHarbinger/BlazorAnalytics.svg)](https://github.com/VeXHarbinger/BlazorAnalytics/stargazers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,47 @@ | ||
Blazor extensions for Analytics. Supported platforms: Google Analytics, GTAG, GTM and FaceBook Pixel. | ||
AspNetCore Version: 8.0 | ||
Blazor extensions for Analytics. | ||
Supported platforms: Google Analytics, Google Tag Manager, and FaceBook Pixel. | ||
|
||
# What is Blazor Analytics and what can it do for me? | ||
|
||
# First Credit where Credit is Due | ||
All the hard work was done by [welisonmenezes](https://github.com/welisonmenezes) in his [blazor-universal-analytics](https://github.com/welisonmenezes/blazor-universal-analytics) repository. | ||
All the hard work was done by [welisonmenezes](https://github.com/welisonmenezes) in his [blazor-universal-analytics](https://github.com/welisonmenezes/blazor-universal-analytics) repository. | ||
|
||
# Configuration | ||
|
||
# Configuration | ||
* Install Nuget | ||
* import the namespaces in _Imports.razor | ||
* Program | ||
* builder.Services.AddBUA(null, null, null); | ||
## For Every Tracker | ||
|
||
``` | ||
First, Install Nuget, then import the namespaces in `_Imports.razor` | ||
|
||
``` | ||
@using BlazorAnalytics | ||
``` | ||
|
||
Then, add the `AnalyticsNavigationTracker` component below your Router in `App.razor`.<br/> | ||
The tracker listens to every navigation change while it's rendered on a page. | ||
|
||
```diff | ||
<Router ... /> | ||
+ <AnalyticsNavigationTracker /> | ||
``` | ||
|
||
## Setting up Analytics | ||
|
||
Inside your main `Startup`/`Program`, call `AddBUA`. This will configure your GTAG_ID automatically. | ||
|
||
```diff | ||
+ builder.Services.AddBlazorAnalytics("YOUR_GTAG_ID", "YOUR_FBPIXEL_ID", null); | ||
``` | ||
|
||
If YOUR_GTM_ID is set, YOUR_GTAG_ID and YOUR_FBPIXEL_ID will be ignored as GTM will manage this for you. Pageview events will be heard if the embed of such scripts exists. | ||
Example: | ||
|
||
``` | ||
builder.Services.AddBlazorAnalytics(null, null, null); | ||
``` | ||
|
||
# How to trigger an Analytics Event | ||
|
||
# Blazor Analytics | ||
[![Build Status](https://VeXHarbinger.visualstudio.com/BlazorAnalytics/_apis/build/status/VeXHarbinger.BlazorAnalytics?branchName=master)](https://VeXHarbinger.visualstudio.com/BlazorAnalytics/_build/latest?definitionId=1&branchName=master) | ||
[![GitHub Issues](https://img.shields.io/github/issues/VeXHarbinger/BlazorAnalytics.svg)](https://github.com/VeXHarbinger/BlazorAnalytics/issues) | ||
[![GitHub Stars](https://img.shields.io/github/stars/VeXHarbinger/BlazorAnalytics.svg)](https://github.com/VeXHarbinger/BlazorAnalytics/stargazers) | ||
[![GitHub Stars](https://img.shields.io/github/stars/VeXHarbinger/BlazorAnalytics.svg)](https://github.com/VeXHarbinger/BlazorAnalytics/stargazers) |