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

  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

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

Last updated

Was this helpful?