Skip to content

Commit b9ac1be

Browse files
committed
Merge branch 'master' into release/v1.6.0
2 parents d93d0fb + 9f3e70c commit b9ac1be

File tree

3 files changed

+28
-25
lines changed

3 files changed

+28
-25
lines changed

.github/docs/Analytics.md

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Blazor Components Analytics extension
22
============
33
[![Build Status](https://dev.azure.com/major-soft/GitHub/_apis/build/status/blazor-components/blazor-components-build-check)](https://dev.azure.com/major-soft/GitHub/_build/latest?definitionId=6)
4-
[![Package Version](https://img.shields.io/nuget/v/Majorsoft.Blazor.Components.Analytics?label=Latest%20Version)](https://www.nuget.org/packages/Majorsoft.Blazor.Components.Analytics/)
5-
[![NuGet Downloads](https://img.shields.io/nuget/dt/Majorsoft.Blazor.Components.Analytics?label=Downloads)](https://www.nuget.org/packages/Majorsoft.Blazor.Components.Analytics/)
4+
[![Package Version](https://img.shields.io/nuget/v/Majorsoft.Blazor.Extensions.Analytics?label=Latest%20Version)](https://www.nuget.org/packages/Majorsoft.Blazor.Extensions.Analytics/)
5+
[![NuGet Downloads](https://img.shields.io/nuget/dt/Majorsoft.Blazor.Extensions.Analytics?label=Downloads)](https://www.nuget.org/packages/Majorsoft.Blazor.Extensions.Analytics/)
66
[![License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/majorimi/blazor-components/blob/master/LICENSE)
77

88
# About
@@ -22,7 +22,7 @@ To make the initialization simple use `GoogleAnalyticsInitializer` component in
2222
## `Google Analytics` extension
2323
This is a JS wrapper for web analytics service offered by Google that tracks and reports website traffic, etc. inside the Google Marketing Platform.
2424

25-
### `PermaLinkElement` component
25+
### `GoogleAnalyticsInitializer` component
2626
A convenient wrapper component for `IGoogleAnalyticsService` to make Google Analytics initialize simple.
2727

2828
#### Properties
@@ -32,6 +32,10 @@ Google Analytics TrackingId provided on Google Analytics manage page.
3232
### `IGoogleAnalyticsService` service
3333
Injectable service to handle Google analytics `gtag.js`.
3434

35+
#### Properties
36+
- **`TrackingId`**: **`string TrackingId { get; set; }` - Required** <br />
37+
Google analytics uniquely Id which was used in `InitializeAsync(string)` method.
38+
3539
#### Functions
3640
- **`InitializeAsync()`**: **`ValueTask InitializeAsync(string trackingId)`** <br />
3741
Initialize Google analytics by registering gtag.js to the HTML document. **Should be called once.
@@ -41,38 +45,38 @@ Allows you to add additional configuration information to targets. This is typic
4145
such as Google Ads or Google Analytics.
4246
- **`GetAsync()`**: **``** <br />
4347
Allows you to get various values from gtag.js including values set with the set command.
44-
- **`SetAsync()`**: **``** <br />
48+
- **`SetAsync()`**: **`ValueTask SetAsync(ExpandoObject parameters)`** <br />
4549
Allows you to set values that persist across all the subsequent gtag() calls on the page.
46-
- **`EventAsync()`**: **``** <br />
50+
- **`EventAsync()`**: **`ValueTask EventAsync(GoogleAnalyticsEventTypes eventType, ExpandoObject eventParams)`** <br />
4751
Use the event command to send event data.
48-
- **`CustomEventAsync()`**: **``** <br />
52+
- **`CustomEventAsync()`**: **`ValueTask CustomEventAsync(string customEventName, GoogleAnalyticsCustomEventArgs eventData)`** <br />
4953
Use the event command to send custom event data.
5054

5155
# Configuration
5256

5357
## Installation
5458

55-
**Majorsoft.Blazor.Components.Analytics** is available on [NuGet](https://www.nuget.org/packages/Majorsoft.Blazor.Components.Analytics/).
59+
**Majorsoft.Blazor.Extensions.Analytics** is available on [NuGet](https://www.nuget.org/packages/Majorsoft.Blazor.Extensions.Analytics/).
5660

5761
```sh
58-
dotnet add package Majorsoft.Blazor.Components.Analytics
62+
dotnet add package Majorsoft.Blazor.Extensions.Analytics
5963
```
60-
Use the `--version` option to specify a [preview version](https://www.nuget.org/packages/Majorsoft.Blazor.Components.Analytics/absoluteLatest) to install.
64+
Use the `--version` option to specify a [preview version](https://www.nuget.org/packages/Majorsoft.Blazor.Components.Extensions/absoluteLatest) to install.
6165

6266
## Usage
6367

6468
Add using statement to your Blazor <component/page>.razor file. Or globally reference it into `_Imports.razor` file.
6569
```
66-
@using Majorsoft.Blazor.Components.Analytics
70+
@using Majorsoft.Blazor.Extensions.Analytics
6771
@*Google Analytics*@
68-
@using Majorsoft.Blazor.Components.Analytics.Google
72+
@using Majorsoft.Blazor.Extensions.Analytics.Google
6973
```
7074

7175
#### WebAssembly projects
7276

7377
**In case of WebAssembly project register services in your `Program.cs` file:**
7478
```
75-
using Majorsoft.Blazor.Components.Analytics;
79+
using Majorsoft.Blazor.Extensions.Analytics;
7680
...
7781
public static async Task Main(string[] args)
7882
{
@@ -88,16 +92,13 @@ public static async Task Main(string[] args)
8892
```
8993
@*Google Analytics initialize*@
9094
<GoogleAnalyticsInitializer TrackingId="<TrackingId here...>" />
91-
92-
@code {
93-
}
9495
```
9596

9697
#### Server hosted projects
9798
**In case of Server hosted project register dependency services in your `Startup.cs` file:**
9899

99100
```
100-
@using Majorsoft.Blazor.Components.Analytics
101+
@using Majorsoft.Blazor.Extensions.Analytics
101102
...
102103
103104
public void ConfigureServices(IServiceCollection services)
@@ -111,9 +112,6 @@ public void ConfigureServices(IServiceCollection services)
111112
```
112113
@*Google Analytics initialize*@
113114
<GoogleAnalyticsInitializer TrackingId="<TrackingId here...>" />
114-
115-
@code {
116-
}
117115
```
118116

119117
#### Using `IGoogleAnalyticsService` service
@@ -126,7 +124,7 @@ For full features supported by Google Analytics please see [docs page](https://d
126124
@inject IGoogleAnalyticsService _googleAnalytincsService
127125
@implements IAsyncDisposable
128126
129-
@code{
127+
@code {
130128
protected override async Task OnAfterRenderAsync(bool firstRender)
131129
{
132130
if(firstRender)
@@ -155,7 +153,7 @@ For full features supported by Google Analytics please see [docs page](https://d
155153
Label = "Test label",
156154
Value = 1234
157155
});
158-
156+
159157
160158
public async ValueTask DisposeAsync()
161159
{
@@ -165,4 +163,4 @@ For full features supported by Google Analytics please see [docs page](https://d
165163
}
166164
}
167165
}
168-
```
166+
```

.github/docs/Maps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ See usage above with empty event handler.
502502
private byte _jsMapZoomLevel = 10;
503503
private int _jsMapWidth = 450;
504504
private int _jsMapHeight = 250;
505-
private bool _jsMapCenterCurrentLocation = true; //Overrides Center. Async operation which micht fail with Location services
505+
private bool _jsMapCenterCurrentLocation = true; //Overrides Center. Async operation which might fail with Location services
506506
private GoogleMapTypes _jsMapType = GoogleMapTypes.Roadmap;
507507
private byte _jsTilt = 0;
508508
private int _jsHeading = 0;

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Majorsoft Blazor Components
1212
[![Build Status](https://dev.azure.com/major-soft/GitHub/_apis/build/status/blazor-components/blazor-components-Nuget?branchName=master)](https://dev.azure.com/major-soft/GitHub/_build/latest?definitionId=7&branchName=master)
1313

1414
Majorsoft Blazor Components is a set of UI Components and other useful Extensions for [Blazor](https://blazor.net) applications.
15-
All components are available on [NuGet](https://www.nuget.org/profiles/Blazor.Components).
15+
All components are free and available on [NuGet](https://www.nuget.org/profiles/Blazor.Components).
1616

1717
You can try out all components and extensions by launching the [demo app](https://blazorextensions.z6.web.core.windows.net/). **Note: this app is hosted on _Azure Static website_ feature. Which uses aggressive caching you might have to use HARD reload (CTRL + F5 or CMD + SHIFT + R), or clear browser cache.**
1818

@@ -77,8 +77,13 @@ Check out our planned components and extensions on the project [Wiki page](https
7777
- **Majorsoft.Blazor.Components.GdprConsent**: [GDPR Consent components](https://github.com/majorimi/blazor-components/blob/master/.github/docs/GdprConsent.md) injectable service and components that renders a customizable GDPR consent Banner or Popup witch Accept/Reject for cookie settings chosen value is persisted to Browser storage.
7878
- **Majorsoft.Blazor.Components.Notifications**: [Notification components](https://github.com/majorimi/blazor-components/blob/master/.github/docs/Notifications.md) injectable INotificationService service to handle HTML5 Notifications and ServiceWorker Notifications and components that renders customizable Alert and Toast notification message elements.
7979

80-
## Other info
80+
## Community
8181
- [Contributing](CONTRIBUTING.md)
82+
- [Report an issue or ask new features](https://github.com/majorimi/blazor-components/issues/new)
83+
-[Thanks for Star ⭐ giving users](https://github.com/majorimi/blazor-components/stargazers) **You can Give a Star ⭐**
84+
- [Support project](https://github.com/majorimi/blazor-components/funding_links?fragment=1) 🙏👍 🍕☕
85+
86+
## Other info
8287
- [Docs](.github/docs)
8388
- [Wiki page](https://github.com/majorimi/blazor-components/wiki)
8489
- [License](LICENSE)

0 commit comments

Comments
 (0)