AI-Powered Events & Push Notifications Quickstart Guide
A step-by-step guide to integrate WonderPush with Appizer for automated, AI-generated push notifications.
Steps
1 Step 1: Integrate WonderPush with your Mobile App or Website
Choose your platform below to see specific integration instructions:
Mobile Applications
iOS
Integrate WonderPush with your iOS app using Swift or Objective-C. Follow the iOS Quickstart Guide.
React Native
Add push notifications to your cross-platform React Native app. Follow the React Native Guide.
Websites
Progressive Web App (PWA)
Add push notifications to your Progressive Web App. Follow the PWA Guide.
Need help with integration?
Our documentation has detailed guides and API references. If you're stuck, contact our support team for assistance.
2 Step 2: Sign Up with Appizer and Configure WonderPush Integration
Follow these steps to set up your Appizer account and connect it to WonderPush:
Create an Appizer Account
If you don't have an Appizer account yet, sign up here. It's free to get started.
Create a New App
After logging in, click "Create New App" and fill in your app details. Choose a name that matches your existing application.
Navigate to Integrations
In your app dashboard, go to Settings → Integrations → WonderPush.
Enter WonderPush Credentials
You'll need your WonderPush Client ID and Client Secret. These can be found in your WonderPush Dashboard under Settings → API Keys.
Security Note
Never share your Client Secret or commit it to version control. It should only be entered in the Appizer dashboard.
Save and Verify
Click Save to store your credentials. Appizer will automatically verify the connection to WonderPush.
Connection Successful
Your Appizer account is now connected to WonderPush. You can now send events and manage push notifications through Appizer.
3 Step 3: Send User Events to Appizer
Track user events by sending them to the Appizer API. Here's how to implement event tracking in your application:
1. API Endpoint
Send POST requests to:
POST https://api.appizer.com/v1/events
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
  "userId": "user_123",
  "event": "product_viewed",
  "properties": {
    "product_id": "prod_456",
    "category": "Electronics",
    "price": 299.99
  },
  "timestamp": "2023-06-15T12:00:00Z",
  "ip": "192.168.1.100",
  "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
}2. Client-Side Implementation
Here's how to track events from your web application:
// Track a basic event
async function trackEvent(userId, event, properties = {}) {
  try {
    const response = await fetch('https://api.appizer.com/v1/events', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'Authorization': 'Bearer YOUR_API_KEY'
      },
      body: JSON.stringify({
        userId,
        event,
        properties,
        timestamp: new Date().toISOString()
      })
    });
    
    if (!response.ok) {
      console.error('Failed to track event:', await response.text());
    }
  } catch (error) {
    console.error('Error tracking event:', error);
  }
}
// Example usage
document.querySelector('.product-card').addEventListener('click', () => {
  trackEvent('user_123', 'product_clicked', {
    productId: 'prod_789',
    position: 3,
    list: 'featured_products'
  });
});import { useEffect } from 'react';
// Custom hook for tracking events
function useEventTracker() {
  const track = async (userId, event, properties = {}) => {
    try {
      const response = await fetch('https://api.appizer.com/v1/events', {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          'Authorization': 'Bearer YOUR_API_KEY'
        },
        body: JSON.stringify({
          userId,
          event,
          properties,
          timestamp: new Date().toISOString(),
          ip: window.location.hostname !== 'localhost' ? undefined : '127.0.0.1', // Optional
          ua: navigator.userAgent // Optional
        })
      });
      
      if (!response.ok) {
        console.error('Failed to track event:', await response.text());
      }
    } catch (error) {
      console.error('Error tracking event:', error);
    }
  };
  
  return { track };
}
// Example component
function ProductCard({ product, userId }) {
  const { track } = useEventTracker();
  
  const handleClick = () => {
    track(userId, 'product_viewed', {
      productId: product.id,
      name: product.name,
      price: product.price,
      category: product.category
    });
  };
  
  return (
    
      {/* Product content */}
    
  );
}3. Server-Side Implementation
For server-side tracking, you can use any HTTP client. Here are examples in different languages:
const axios = require('axios');
async function trackEvent(userId, event, properties = {}) {
  try {
    await axios.post('https://api.appizer.com/v1/events', {
      userId,
      event,
      properties,
      timestamp: new Date().toISOString()
    }, {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
      }
    });
  } catch (error) {
    console.error('Error tracking event:', error.response?.data || error.message);
  }
}import requests
import json
from datetime import datetime
def track_event(user_id, event, properties=None):
    if properties is None:
        properties = {}
        
    url = "https://api.appizer.com/v1/events"
    headers = {
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    }
    data = {
        "userId": user_id,
        "event": event,
        "properties": properties,
        "timestamp": datetime.utcnow().isoformat() + "Z"
    }
    
    try:
        response = requests.post(url, headers=headers, json=data)
        response.raise_for_status()
    except requests.exceptions.RequestException as e:
        print(f"Error tracking event: {e}")Event Naming Best Practices
- Use past tense for event names (e.g., product_viewed,checkout_completed)
- Use snake_case for all event and property names
- Be consistent with naming across your application
- Include relevant properties to provide context about the event
- Don't include personally identifiable information (PII) in event properties
4 Step 4: Configure AI-Generated Push Notifications
Set up AI-powered push notifications to automatically send personalized messages based on user behavior and events.
How AI-Powered Notifications Work
Appizer uses OpenAI's GPT-3.5-turbo model to generate personalized push notifications based on:
- User Behavior: Past interactions and events
- Event Context: Properties and metadata from tracked events
- User Preferences: Language, timezone, and notification settings
- Campaign Goals: Whether you want to re-engage, inform, or convert
1. Create an AI-Powered Campaign
- 
                                    Go to the Campaigns section in your Appizer dashboard This is where you'll manage all your notification campaigns 
- 
                                    Click New Campaign and select AI-Powered Push Choose this option for AI-generated notifications 
- 
                                    Configure your campaign settings: - Campaign Name: Internal name for your reference
- Target Audience: Segment users based on events, properties, or tags
- Schedule: Send immediately or schedule for later
- Priority: Set notification priority (high, normal, low)
 
2. Configure AI Settings
Choose the AI model for generating notifications
Controls randomness in AI responses
Maximum length of notification text
Instructions for the AI to follow when generating messages
3. Define Trigger Events
Set up rules for when notifications should be sent based on user events:
Trigger Condition
When user completes event with purchase_completed
And all of these conditions are met:
- User has not received a notification in the last 24 hours
- User has made at least 2 purchases
- User's lifetime value is greater than $100
4. Preview and Test
Hey there! We noticed you just purchased a new item. Check out these similar products you might love! 🛍️
Tap to view details
Best Practices for AI-Powered Notifications
- Be specific with your prompts - The more context you provide, better the AI can generate relevant messages
- Test different variations - Try different temperature settings to balance creativity and relevance
- Monitor performance - Track open and click-through rates to optimize your AI prompts
- Respect user preferences - Always honor user notification settings and timezone differences
- Personalize when possible - Use dynamic variables like user names or recent activity to increase engagement