Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(build): remove json files from nuget package content folders #18

Merged
merged 12 commits into from
May 8, 2024
Merged
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ segments_2i

# Generated files
**/Client/dist/*
**/nuget-local/*.*pkg

./src/Kentico.Xperience.TagManager/wwwroot/Scripts/ktc-tagmanager.js
**/src/Kentico.Xperience.TagManager/wwwroot/*

**/CMSModules/WebFarm/*

16 changes: 8 additions & 8 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,36 +89,36 @@
{
"type": "npm",
"script": "install",
"path": "src/Kentico.Xperience.TagManager/Frontend",
"path": "src/Kentico.Xperience.TagManager/Admin/Frontend",
"group": "build",
"problemMatcher": [],
"label": "npm: install - src/Kentico.Xperience.TagManager/Frontend",
"label": "npm: install - src/Kentico.Xperience.TagManager/Admin/Frontend",
"detail": "install dependencies from package"
},
{
"type": "npm",
"script": "build",
"path": "src/Kentico.Xperience.TagManager/Frontend",
"path": "src/Kentico.Xperience.TagManager/Admin/Frontend",
"group": "build",
"problemMatcher": [],
"label": "npm: build - src/Kentico.Xperience.TagManager/Frontend",
"label": "npm: build - src/Kentico.Xperience.TagManager/Admin/Frontend",
"detail": "webpack --mode=production"
},
{
"type": "npm",
"script": "build:dev",
"path": "src/Kentico.Xperience.TagManager/Frontend",
"path": "src/Kentico.Xperience.TagManager/Admin/Frontend",
"group": "build",
"problemMatcher": [],
"label": "npm: build:dev - src/Kentico.Xperience.TagManager/Frontend",
"label": "npm: build:dev - src/Kentico.Xperience.TagManager/Admin/Frontend",
"detail": "webpack --mode=development"
},
{
"type": "npm",
"script": "start",
"path": "src/Kentico.Xperience.TagManager/Frontend",
"path": "src/Kentico.Xperience.TagManager/Admin/Frontend",
"problemMatcher": [],
"label": "npm: start - src/Kentico.Xperience.TagManager/Frontend",
"label": "npm: start - src/Kentico.Xperience.TagManager/Admin/Frontend",
"detail": "webpack serve --mode development"
},
{
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
Expand Down
8 changes: 4 additions & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
<PackageVersion Include="Kentico.Xperience.TagManager" Version="" Condition="'$(LOCAL_NUGET)' == 'true'" />
<PackageVersion Include="Microsoft.Extensions.Configuration.UserSecrets" Version="6.0.1" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.21.0.86780" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.25.0.90414" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageVersion Include="NUnit" Version="4.1.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="NUnit.Analyzers" Version="4.0.1" />
<PackageVersion Include="coverlet.collector" Version="6.0.1" />
<PackageVersion Include="NUnit.Analyzers" Version="4.2.0" />
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
</ItemGroup>
</Project>
8 changes: 7 additions & 1 deletion Directory.build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<AssemblyToSign Include="$(TargetPath)" />
<AssemblyToSign Include="$(XmlSerializersTargetPath)" Condition="Exists('$(XmlSerializersTargetPath)')" />
</ItemGroup>

</Target>

<ItemGroup>
<Content Remove="Admin/Client/*.json" />
<Content Remove="Admin/FrontEnd/*.json" />
<Content Remove="Admin/*.json" />
<Content Remove="../Kentico.Xperience.TagManager/*.json"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix indentation.

</ItemGroup>
</Project>
73 changes: 36 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,31 @@
## Description

Tag Manager integration enabling marketers to include prebuilt and custom tags into a website channel. By default we provide support for the following tags:

- Google Tag Manager
- Google Tag Manager is the standard for implementing front-end services, marketing and tracking tags to a website. This integration makes it easy to include Google Tag Manager into your website to leverage andvanced tag setup.
- [Integration information and installation guide](./docs/Google-Tag-Manager.md)
- [Google Tag Manager homepage](https://tagmanager.google.com/)
- Google Tag Manager is the standard for implementing front-end services, marketing and tracking tags to a website. This integration makes it easy to include Google Tag Manager into your website to leverage andvanced tag setup.
- [Integration information and installation guide](./docs/Google-Tag-Manager.md)
- [Google Tag Manager homepage](https://tagmanager.google.com/)
- Google Analytics 4
- Google Analytics 4 lets you track users on your website. The default installation enables pageview tracking and basic events.
- [Integration information and installation guide](./docs/Google-Analytics-4.md)
- [Google Analytics homepage](https://tagmanager.google.com/)
- Google Analytics 4 lets you track users on your website. The default installation enables pageview tracking and basic events.
- [Integration information and installation guide](./docs/Google-Analytics-4.md)
- [Google Analytics homepage](https://tagmanager.google.com/)
- Microsoft Clarity recordings and heatmaps
- Microsoft Clarity lets you record user sessions, generate heatmaps, scrollmaps and further analyze your website users. The service is completely free.
- [Integration information and installation guide](./docs/Microsoft-Clarity.md)
- [Microsoft Clarity homepage](https://clarity.microsoft.com/)
- Microsoft Clarity lets you record user sessions, generate heatmaps, scrollmaps and further analyze your website users. The service is completely free.
- [Integration information and installation guide](./docs/Microsoft-Clarity.md)
- [Microsoft Clarity homepage](https://clarity.microsoft.com/)
- VWO A/B Testing
- VWO lets you optimize digital experiences and maximize conversions using their suite of tools. This integration is focusing on front-end A/B testing capability. It installs VWO SmartCode into your wesite
- [Integration information and installation guide](./docs/VWO.md)
- Visit [VWO homepage](https://vwo.com/) to learn more about the product
- VWO lets you optimize digital experiences and maximize conversions using their suite of tools. This integration is focusing on front-end A/B testing capability. It installs VWO SmartCode into your wesite
- [Integration information and installation guide](./docs/VWO.md)
- Visit [VWO homepage](https://vwo.com/) to learn more about the product
- Intercom Messenger
- Intercom offers a suite of tools to promising they are "The only AI customer service solution you need". The focus of this integration is their Messenger allowing you to communicate with customers live through your website.
- [Integration information and installation guide](./docs/Intercom.md)
- [Intercom homepage](https://www.intercom.com)
- Intercom offers a suite of tools to promising they are "The only AI customer service solution you need". The focus of this integration is their Messenger allowing you to communicate with customers live through your website.
- [Integration information and installation guide](./docs/Intercom.md)
- [Intercom homepage](https://www.intercom.com)
- Custom HTML Snippet
- Whenever you need to copy and paste a simple code snippet form another service into your website.
- Whenever you need to copy and paste a simple code snippet form another service into your website.
- Custom Tag Module
- When the site admin wants to enable a new pre-defined code snippet to be used by marketers.


- When the site admin wants to enable a new pre-defined code snippet to be used by marketers.

## Screenshots

Expand Down Expand Up @@ -84,24 +83,24 @@ dotnet add package Kentico.Xperience.TagManager

3. In the administration go to UI application 'Tag Management'.
4. Create a new record:
* Select one of the channels.
* Select whether you want to use Custom Code Snippet or other Snippet type
* We have prepared some of the most often used types:
* For
* 'Google Tag Manager',
* 'Google Analytics 4',
* 'VWO',
* 'Intercom',
* 'Microsoft Clarity',
* or Your own type
* select one of these options from the Snippet type dropdown
* For 'Custom code snippet' fill in entire code you want to render.
* Select a location:
* Top of the head - inserts a script immediately after the opening head tag.
* Bottom of the head - inserts a script right before the closing head tag.
* Top of the body - inserts a script immediately after the opening body tag.
* Bottom of the body - inserts a script right before the closing body tag.
* Fill in a consent if required.
- Select one of the channels.
- Select whether you want to use Custom Code Snippet or other Snippet type
- We have prepared some of the most often used types:
- For
- 'Google Tag Manager',
- 'Google Analytics 4',
- 'VWO',
- 'Intercom',
- 'Microsoft Clarity',
- or Your own type
- select one of these options from the Snippet type dropdown
- For 'Custom code snippet' fill in entire code you want to render.
- Select a location:
- Top of the head - inserts a script immediately after the opening head tag.
- Bottom of the head - inserts a script right before the closing head tag.
- Top of the body - inserts a script immediately after the opening body tag.
- Bottom of the body - inserts a script right before the closing body tag.
- Fill in a consent if required.
5. During rendering the livesite page, the Tag manager module automatically adds custom code snippets with accepted consents to defined locations.
6. To dynamically update the rendered code snippets, for example if a consent is accepted, call javascript function `window.xperience.tagManager.updateCodeSnippets()`.

Expand Down
6 changes: 4 additions & 2 deletions docs/Contributing-Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ To run the Sample app Admin customization in development mode, add the following

> In the future, we will be able to use floating versions to automatically select the highest (local) package version

1. Update the `nuget.config` by uncommenting the `<package pattern="Kentico.Xperience.TagManager" />` entry in `<packageSource key="LocalPackages">`. This will tell NuGet to resolve the current library from the local nuget package folder instead of the class library.

1. Build the solution with the `LOCAL_NUGET=true` property

> You can use the VS Code `.NET: build (Solution) - LOCAL_NUGET` task
Expand All @@ -92,9 +94,9 @@ To run the Sample app Admin customization in development mode, add the following

> You can use the `.NET Launch (DancingGoat) - LOCAL_NUGET` lauch setting in VS Code

1. Undo the `Directory.Packages.props` version number change to ensure it is not committed to the repository
1. Undo the `Directory.Packages.props` version number and `nuget.config` changes to ensure they are not committed to the repository

1. Perform a normal build to reset any modified `packages.lock.json` files
1. Perform a normal build to reset any modified `packages.lock.json` files, which were modified when switching from a class library to a NuGet reference

### Create a PR

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public class SampleDataGeneratorApplication : OverviewPageBase
private readonly IFormBuilderConfigurationSerializer formBuilderConfigurationSerializer;
private readonly IEventLogService eventLogService;
private readonly IInfoProvider<ConsentInfo> consentInfoProvider;
private readonly IBizFormInfoProvider bizFormInfoProvider;
private readonly IContactGroupInfoProvider contactGroupInfoProvider;
private readonly IInfoProvider<BizFormInfo> bizFormInfoProvider;
private readonly IInfoProvider<ContactGroupInfo> contactGroupInfoProvider;
private readonly ISettingsKeyInfoProvider settingsKeyInfoProvider;
private readonly IInfoProvider<WebsiteChannelInfo> websiteChannelInfoProvider;

Expand All @@ -61,8 +61,8 @@ public SampleDataGeneratorApplication(
IFormBuilderConfigurationSerializer formBuilderConfigurationSerializer,
IEventLogService eventLogService,
IInfoProvider<ConsentInfo> consentInfoProvider,
IBizFormInfoProvider bizFormInfoProvider,
IContactGroupInfoProvider contactGroupInfoProvider,
IInfoProvider<BizFormInfo> bizFormInfoProvider,
IInfoProvider<ContactGroupInfo> contactGroupInfoProvider,
ISettingsKeyInfoProvider settingsKeyInfoProvider,
IInfoProvider<WebsiteChannelInfo> websiteChannelInfoProvider)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ internal class DancingGoatSamplesModule : Module
{
private const string DATA_PROTECTION_SAMPLES_ENABLED_SETTINGS_KEY_NAME = "DataProtectionSamplesEnabled";

private IContactInfoProvider contactInfoProvider;
private IInfoProvider<ContactInfo> contactInfoProvider;
private IMemberInfoProvider memberInfoProvider;
private IInfoProvider<ConsentAgreementInfo> consentAgreementInfoProvider;
private IBizFormInfoProvider bizFormInfoProvider;
private IAccountContactInfoProvider accountContactInfoProvider;
private IInfoProvider<BizFormInfo> bizFormInfoProvider;
private IInfoProvider<AccountContactInfo> accountContactInfoProvider;
private ISettingsKeyInfoProvider settingsKeyInfoProvider;
private IActivityInfoProvider activityInfoProvider;
private IInfoProvider<ActivityInfo> activityInfoProvider;
private ICountryInfoProvider countryInfoProvider;
private IStateInfoProvider stateInfoProvider;
private IAccountInfoProvider accountInfoProvider;
private IInfoProvider<AccountInfo> accountInfoProvider;


/// <summary>
Expand All @@ -57,16 +57,16 @@ protected override void OnInit()
{
base.OnInit();

contactInfoProvider = Service.Resolve<IContactInfoProvider>();
contactInfoProvider = Service.Resolve<IInfoProvider<ContactInfo>>();
memberInfoProvider = Service.Resolve<IMemberInfoProvider>();
consentAgreementInfoProvider = Service.Resolve<IInfoProvider<ConsentAgreementInfo>>();
bizFormInfoProvider = Service.Resolve<IBizFormInfoProvider>();
accountContactInfoProvider = Service.Resolve<IAccountContactInfoProvider>();
bizFormInfoProvider = Service.Resolve<IInfoProvider<BizFormInfo>>();
accountContactInfoProvider = Service.Resolve<IInfoProvider<AccountContactInfo>>();
settingsKeyInfoProvider = Service.Resolve<ISettingsKeyInfoProvider>();
activityInfoProvider = Service.Resolve<IActivityInfoProvider>();
activityInfoProvider = Service.Resolve<IInfoProvider<ActivityInfo>>();
countryInfoProvider = Service.Resolve<ICountryInfoProvider>();
stateInfoProvider = Service.Resolve<IStateInfoProvider>();
accountInfoProvider = Service.Resolve<IAccountInfoProvider>();
accountInfoProvider = Service.Resolve<IInfoProvider<AccountInfo>>();

InitializeSamples();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ namespace Samples.DancingGoat
/// </summary>
internal class SampleContactInfoIdentityCollector : IIdentityCollector
{
private readonly IContactInfoProvider contactInfoProvider;
private readonly IInfoProvider<ContactInfo> contactInfoProvider;


/// <summary>
/// Initializes a new instance of the <see cref="SampleContactInfoIdentityCollector"/> class.
/// </summary>
/// <param name="contactInfoProvider">Contact info provider.</param>
public SampleContactInfoIdentityCollector(IContactInfoProvider contactInfoProvider)
public SampleContactInfoIdentityCollector(IInfoProvider<ContactInfo> contactInfoProvider)
{
this.contactInfoProvider = contactInfoProvider;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ namespace Samples.DancingGoat
/// </summary>
internal class SampleContactDataCollector : IPersonalDataCollector
{
private readonly IActivityInfoProvider activityInfoProvider;
private readonly IInfoProvider<ActivityInfo> activityInfoProvider;
private readonly ICountryInfoProvider countryInfoProvider;
private readonly IStateInfoProvider stateInfoProvider;
private readonly IInfoProvider<ConsentAgreementInfo> consentAgreementInfoProvider;
private readonly IAccountContactInfoProvider accountContactInfoProvider;
private readonly IAccountInfoProvider accountInfoProvider;
private readonly IBizFormInfoProvider bizFormInfoProvider;
private readonly IInfoProvider<AccountContactInfo> accountContactInfoProvider;
private readonly IInfoProvider<AccountInfo> accountInfoProvider;
private readonly IInfoProvider<BizFormInfo> bizFormInfoProvider;


/// <summary>
Expand All @@ -34,13 +34,13 @@ internal class SampleContactDataCollector : IPersonalDataCollector
/// <param name="accountInfoProvider">Account info provider.</param>
/// <param name="bizFormInfoProvider">BizForm info provider.</param>
public SampleContactDataCollector(
IActivityInfoProvider activityInfoProvider,
IInfoProvider<ActivityInfo> activityInfoProvider,
ICountryInfoProvider countryInfoProvider,
IStateInfoProvider stateInfoProvider,
IInfoProvider<ConsentAgreementInfo> consentAgreementInfoProvider,
IAccountContactInfoProvider accountContactInfoProvider,
IAccountInfoProvider accountInfoProvider,
IBizFormInfoProvider bizFormInfoProvider)
IInfoProvider<AccountContactInfo> accountContactInfoProvider,
IInfoProvider<AccountInfo> accountInfoProvider,
IInfoProvider<BizFormInfo> bizFormInfoProvider)
{
this.activityInfoProvider = activityInfoProvider;
this.countryInfoProvider = countryInfoProvider;
Expand Down
Loading
Loading