Creating a service (Najva script)
The first step in setting up push notifications is to create a service and install the Najva script on your site.
Sign in to the Najva panel, go to Menu > Settings > Script settings (منو > تنظیمات > تنظیمات اسکریپت), and click Create your first service (ساخت اولین سرویس). If you have already created a service for another domain, you can add a new service from the same place with the Create new service (ساخت سرویس جدید) button.
Creating a service has three steps: 1. General settings (1. تنظیمات عمومی) → 2. Install script (2. نصب اسکریپت) → 3. Review and confirm (3. بررسی و تایید)
Step 1: General settings
Section titled “Step 1: General settings”- Choose the service type. Currently only Website (وبسایت) can be selected; the Application (اپلیکیشن) option is disabled and labeled “Coming soon” (به زودی). To implement push on a mobile app, use the libraries in the Najva developer documentation.
- Specify your business field. The list has 18 categories: Retail and e-commerce (خردهفروشی و تجارت الکترونیک), Food and beverage (صنایع غذایی و نوشیدنی), Pharmacies and healthcare services (داروخانهها و خدمات درمانی), Fitness and healthy lifestyle (تناسباندام و سبک زندگی سالم), Tourism and hospitality (گردشگری و مهمانداری), Events and entertainment (رویدادها و سرگرمی), Media and digital content (رسانه و محتوای دیجیتال), Personal services (خدمات شخصی), Agencies, marketing and consulting (آژانسها و بازاریابی و مشاوره), Finance and insurance (مالی و بیمه), Nonprofit and government organizations (سازمانهای غیرانتفاعی و دولتی), Real estate (املاک و مستغلات), Education and learning (آموزش و یادگیری), Recruitment and human resources (استخدام و منابع انسانی), Software and technology (نرمافزار و فناوری), Agriculture and related industries (کشاورزی و صنایع وابسته), Transportation and logistics (حملونقل و لجستیک), Communications and public services (ارتباطات و خدمات عمومی), Other (سایر).
- Enter your website address. Write the domain without
http://andhttps://, as the main address only; for exampleyourdomain.ir - Click Next step (مرحله بعد).
Step 2: Install the Najva push script on your site
Section titled “Step 2: Install the Najva push script on your site”You have three methods.
1. Manual script installation
Section titled “1. Manual script installation”If you have direct access to your website’s code, this is the simplest method. Copy the script code from the panel and place it right before the closing </head> tag. On typical websites, this code goes in a file such as header.html or in your theme’s header. If you do not have access to the site’s files, ask your technical team for help.
2. Installation with Google Tag Manager
Section titled “2. Installation with Google Tag Manager”For this method, Tag Manager must already be installed and set up on your site, and the Tag Manager script must have been added to the site.
- Sign in to your Google Tag Manager account and click Add a new tag.
- Under Tag Configuration, choose Custom HTML.
- Copy the script from the Najva panel.
- Paste the script into the HTML field.
- Go to Triggering and choose the trigger you want.
- Save the tag.
- Publish a new Version so the tag becomes active.
3. Installation with a plugin
Section titled “3. Installation with a plugin”This method is for WordPress sites and for users without enough technical knowledge. You can install the plugin in two ways:
- Download the plugin directly from the Najva panel and install it in WordPress.
- Search for and install the plugin from within the WordPress admin panel.
After installation, in the plugin’s settings, enter your dedicated installation code (کد نصب اختصاصی) in the corresponding field and save.
Step 3: Review and confirm
Section titled “Step 3: Review and confirm”After installation, click Next step (مرحله بعد) so Najva can verify the script installation on your domain. You will see one of these three statuses:
- “The script is placed correctly!” (اسکریپت به درستی قرار گرفته است!) — the installation succeeded. Click Confirm and finalize (تایید و نهاییسازی).
- “The script is not placed correctly!” (اسکریپت به درستی قرار نگرفته است!) — go through the installation steps again and wait for the Najva specialists to review it.
- “Checking the script!” (در حال بررسی اسکریپت!) — your service will be approved after the Najva support team reviews it.
After the service is created, the panel reminds you that you need to create a subscription form for subscriber acquisition to become active.
Managing services
Section titled “Managing services”- There is no limit on the number of services; you can create a separate service for every domain you own.
- The list of all services can be viewed and managed on this same page.
- Add a new service with the Create new service (ساخت سرویس جدید) button.
- Click the three-dot icon (⋮) next to any service to edit it.
For more questions, see the push notification FAQ.
Next step
Section titled “Next step”After creating the service, it is time for subscription settings.