Skip to main content
Add the Notifly custom template to Google Tag Manager (GTM) to configure SDK initialization, user information, and event tracking without changing your application code.

1. Install the Notifly custom template

  1. Download the latest template. Download the template from the releases page.
    • Korean template: template.ko.tpl
    • English template: template.tpl. The steps below use this version.
  2. In GTM, open Templates near the bottom of the left menu. Under Tag Templates, create a template. If the list is empty, click Add tag template. Create a template
  3. In the template editor, select ⋮ > Import in the upper right. Import the .tpl file you downloaded. Import the template
  4. Click Save. The Template created message appears at the bottom left. Template created

2. Create an SDK initialization tag

  1. In Google Tag Manager, open Tags in the left menu and click New.
  2. Name the tag, then click Tag Configuration.
  3. Under Custom at the bottom of the tag type list, select Notifly Javascript SDK. Custom template selection
  4. In the tag configuration, set Tag Type to Initialize (initialize) (SDK 초기화 (initialize) in the Korean template), then enter Project ID* and Username*. Password* is a placeholder for backward compatibility. Do not enter a real password or API Secret Key. Enter the same nonempty value as Username*. See the Notifly SDK initialization options. Tag type
  5. Advanced settings
  • Set Tag firing options to Once per page.
  • Set the trigger to Initialization - All Pages. Advanced settings Trigger

3. Manage users

Set userId and userProperties for campaign targeting and personalization. You can also store values such as push notification consent in userProperties and use them in filters.
The SDK initialization tag must run first.

1. Set the user ID (setUserId)

  1. Go to Tags > New, name the tag, for example Notifly – setUserId, then click Tag Configuration.
  2. Set Tag Type to Set User ID (setUserId) (유저 아이디 등록 (setUserId) in the Korean template). In the User ID field (유저 아이디 in the Korean template), select a GTM variable, such as {{User ID}}.\ Tag type
  3. In Tag Sequencing, configure the SDK initialization tag to run first. Other tags do not work unless the initialization tag has run. Tag sequencing
  4. Use a custom event that fires after sign-in, such as login_success, as the trigger. Trigger

2. Set user properties (setUserProperties)

Before sending sensitive user propertiesBefore sending custom user properties that need protection, such as names or addresses, register each key under User Management > User List > Property management in the console and enable encryption. Use the same key names as in the data you send.For setup instructions and limitations, see the property management guide.
  1. Go to Tags > New, name the tag, for example Notifly – setUserProperties, then open Tag Configuration.
  2. Set Tag Type to Set User Properties (setUserProperties) (유저 속성 등록 (setUserProperties) in the Korean template). Map the properties you want to register to the corresponding GTM variables. Tag type
  3. In Tag Sequencing, configure setUserId to run before setUserProperties. Tag sequencing
  • Email delivery requires $email. Kakao AlimTalk, Friendtalk, and SMS delivery require $phone_number. LINE message delivery requires $line_user_id.
  • Use reserved keys exactly as written, such as $email, $phone_number, and $line_user_id.
Leave User ID empty in the Set User ID (setUserId) tag that runs on sign-out. This disassociates the current device from the user.

4. Log events (trackEvent)

Send user actions, such as clicks, views, and purchases, as events for segmentation, triggers, and performance analysis.
  • Configure tag sequencing so the event tag runs after the SDK initialization tag.
  • In Set of Keys for User Segmentation (segmentationEventParamKeys), you can add at most one key.
  1. Go to Tags > New, name the tag, for example Notifly – trackEvent, then open Tag Configuration.
  2. Set Tag Type to Track Event (trackEvent) (이벤트 로깅 (trackEvent) in the Korean template) and enter an event name. If needed, map event parameters to GTM variables and add a key under Set of Keys for User Segmentation. Tag type
  3. In Tag Sequencing, configure the tag to run after the SDK initialization tag.
  4. For example, use GTM’s built-in variable Click ID and built-in trigger Click - All Elements to send the clicked element’s id as element_id. Add element_id under Set of Keys for User Segmentation. Variables Event trigger

5. Test the integration

After you install the SDK, follow Test your integration to verify event collection and push notification delivery.

6. Configure web push notifications (advanced)