diff --git a/README.md b/README.md index 105a6fc..b9ce123 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,13 @@ Integrate Tag Commander with your React applications seamlessly using the `react - [License](#license) - [Development](#development) -# Features +# Features - Automatic page tracking - Event triggering - Supports multiple containers -# Installation and Quick Start +# Installation and Quick Start ## Installation @@ -88,11 +88,11 @@ function App() { return ( tcReady ?
Containers loaded
:
Now loading
); } ``` -# Methods +# Methods Many methods are asynchronous. If you want to ensure that a method has been executed before continuing, you can use the `await` keyword. Please check the function definition to see if it is asynchronous. -## Container Management +## Container Management ```js // Adding a container await wrapper.addContainer('my-custom-id', '/url/to/container.js', 'head'); @@ -101,7 +101,7 @@ Many methods are asynchronous. If you want to ensure that a method has been exec wrapper.removeContainer('my-custom-id'); ``` -## Variable Management +## Variable Management ```js // Set variables await wrapper.setTcVars({ env_template : "shop", ... }); @@ -116,7 +116,7 @@ Many methods are asynchronous. If you want to ensure that a method has been exec wrapper.removeTcVar('VarKey'); ``` -## Events +## Events - Refer to the [base documentation on events](https://community.commandersact.com/tagcommander/user-manual/container-management/events) for an understanding of events in general. - The method "triggerEvent" is the new name of the old method "captureEvent"; an alias has been added to ensure backward compatibility. @@ -130,7 +130,7 @@ Many methods are asynchronous. If you want to ensure that a method has been exec await wrapper.triggerEvent(eventLabel, htmlElement, data); ``` -# Reloading Containers +# Reloading Containers 1. **Manual Reload**: Update your container after any variable change. ```js @@ -152,7 +152,7 @@ Many methods are asynchronous. If you want to ensure that a method has been exec } ``` -# Sample App +# Sample App To help you with your implementation we provided a sample application. To run it clone the repo then run: ```bash @@ -161,10 +161,10 @@ yarn start ``` Then, visit [http://localhost:3000](http://localhost:3000). -# License +# License This module uses the [MIT License](http://revolunet.mit-license.org). Contributions are welcome. -# Development +# Development After forking, set up your environment: