Skip to content

Commit

Permalink
Create release-package.yml
Browse files Browse the repository at this point in the history
Part of the Package Pipeline
  • Loading branch information
VeXHarbinger committed Feb 17, 2024
1 parent e62c7d6 commit 7d267c4
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 16 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release-package.yml
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}}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@VeXHarbinger:registry=https://npm.pkg.github.com
15 changes: 14 additions & 1 deletion BlazorAnalytics/BlazorAnalytics.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@
<Nullable>enable</Nullable>
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
<StaticWebAssetProjectMode>Default</StaticWebAssetProjectMode>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Title>Blazor Analytics </Title>
<Authors>VeXHarbinger</Authors>
<Company>High Falootin Technology, Corporation</Company>
<Description>Simple Blazor component to push Event and page view data to the analytic services. </Description>
<Copyright>2024</Copyright>
<PackageProjectUrl>https://github.com/VeXHarbinger/BlazorAnalytics</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/VeXHarbinger/BlazorAnalytics</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>blazor, analytics, google-analytics, google-tag-manager, facebook-pixel, blazor-analytics, blazor-google-analytics, blazor-google-tag-manager,</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand All @@ -15,7 +26,9 @@
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
</ItemGroup>


<PropertyGroup>
<RepositoryUrl>https://github.com/VeXHarbinger/BlazorAnalytics</RepositoryUrl>
</PropertyGroup>

<ItemGroup>
<None Include="wwwroot\BlazorAnalytics.js" />
Expand Down
31 changes: 31 additions & 0 deletions BlazorAnalytics/README.md
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)
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,49 @@

<PageTitle>Home</PageTitle>

<h1>Hello, world!</h1>

Welcome to your new app.

This is just my small update on all the hard work X did.
<div class="container text-center">
<header>
<blockquote class="blockquote text-center pagePart">
<h1 class="display-1"> Analytic Hooks</h1>
<h2 class="lead text-muted">Currently Available</h2>
</blockquote>
</header>
<div class="row">
<div class="col m-3">
<div class="card" style="width: 18rem;">
<div class="card-header">
Google Analytics
</div>
<div class="card-body">
<h5 class="card-title">Google Analytics</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="https://analytics.google.com/" target="_blank" class="btn btn-primary">Read More</a>
</div>
</div>
</div>
<div class="col m-3">
<div class="card" style="width: 18rem;">
<div class="card-header">
Google Tag Manager
</div>
<div class="card-body">
<h5 class="card-title">Google Tag Manager</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="https://marketingplatform.google.com/about/tag-manager/" target="_blank" class="btn btn-primary">Read More</a>
</div>
</div>
</div>
<div class="col m-3">
<div class="card" style="width: 18rem;">
<div class="card-header">
Pixel
</div>
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" target="_blank" class="btn btn-primary">Read More</a>
</div>
</div>
</div>
</div>
</div>
37 changes: 27 additions & 10 deletions README.md
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)

0 comments on commit 7d267c4

Please sign in to comment.