# Set Onesignal Tags

### Overview

The "Set OneSignal Tags" block allows you to customize the status bar on native devices by passing customer tag information from your Shopify store to the OneSignal notification service. This enables personalized notifications and experiences based on customer attributes.

### Installation

<figure><img src="/files/qZqEG2Dsoq8NzKHlFyO5" alt="" width="306"><figcaption></figcaption></figure>

1. Navigate to **Online Store > Themes** in your Shopify admin panel
2. Click **Customize** next to your current theme
3. Select the **App Embeds** section
4. Enable the **Set OneSignal Tags** block
5. Click **Save** to apply the changes

### Adding Customer Tags

<figure><img src="/files/1ENE8uq4I90opzEVrv9u" alt=""><figcaption></figcaption></figure>

To add tags to a customer profile:

1. Go to **Customers** in your Shopify admin
2. Select the customer you want to tag
3. In the customer details page, locate the **Tags** section (indicated by an arrow in the right sidebar)
4. Click the edit icon (pencil) next to the Tags
5. Enter your tags using the format `key:value` (e.g., `premium:true`, `subscription:monthly`)
6. Press Enter after each tag
7. Click outside the tag field to save

### Tag Structure

Tags should follow this format to be recognized by the system:

```
tagname:tagvalue
```

For example:

* `premium:true`
* `subscription:monthly`
* `preference:casual`

### Use Cases

#### Customer Segmentation

Create customer segments based on:

* Subscription type
* Purchase history
* Customer preferences
* Loyalty tier

#### Personalized Notifications

Customize notifications based on customer attributes:

* Send different notifications to premium vs. standard customers
* Adjust notification frequency based on customer preferences
* Target notifications based on product interests

### Best Practices

1. **Tag Naming Convention**
   * Use consistent, lowercase naming for tags
   * Avoid spaces or special characters
   * Example: `customer_type:premium` instead of `Customer Type:Premium`
2. **Limit Tag Volume**
   * Only create tags that will be used for targeting
   * Keep tag values concise
   * Avoid excessive tagging that could slow performance
3. **Test Before Deployment**
   * Verify tag transmission using the OneSignal dashboard
   * Test notifications on different device types
   * Confirm status bar customizations appear as expected
4. **Privacy Considerations**
   * Only use non-sensitive customer information
   * Ensure compliance with privacy regulations
   * Provide clear opt-out mechanisms for notifications

### Troubleshooting

#### Tags Not Appearing in OneSignal

* Verify the customer is logged in
* Check that tags follow the `key:value` format
* Inspect the browser console for JavaScript errors
* Confirm the WebToNative library is loading correctly

### Support Resources

* [OneSignal Documentation](https://documentation.onesignal.com/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.webtonative.com/shopify/set-onesignal-tags.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
