Initial Entries

Kigo TOP SDK Initial Entries Configuration

The Initial Entries configuration allows partners to define the first page or route users will see when the Kigo TOP SDK initializes. This provides flexibility to route users directly to the homepage, a specific offer, a filtered search result, or the full offer listing.


Overview

Initial entries are controlled via the kigo.initialEntries property.
The SDK checks this configuration on load and uses the defined route(s) as the initial navigation path.


Example Configuration

window.Kigo.onReady = function (kigo) {
  kigo.initialEntries = ['/home']; 
};

In this example:

  • Users are routed to the homepage (/home) by default.
  • Partners can override this value to start on different offer pages or search results.

Context Type Definition

type KigoInitialEntriesConfig = {
  initialEntries: string[]; // e.g. ['/home'], ['/offers/[offer_id]'], ['/offers?search=ice+cream']
};

Supported Routes

1. Homepage (Default)

kigo.initialEntries = ['/home'];

The default landing page. Recommended to keep as the fallback.

2. Specific Offer Page

kigo.initialEntries = ['/offers/[offer_id]'];

Example with location (best practice):

kigo.initialEntries = ['/offers/50323909?location_id=1898267'];

Best Practice: Always include location_id when possible to narrow down the results for the user’s specific location.

3. Search Results Page

kigo.initialEntries = ['/offers?search=ice%20cream'];

Navigates directly to results filtered by a search query.

Note: Always URL-encode spaces and special characters in query strings (e.g., use ice%20cream instead of ice cream).

4. Offer Listing Page

kigo.initialEntries = ['/offers'];

Navigates to the general listing of all available offers.

Summary of Use Cases

Target PageExample ValueNotes
Home Page (default)/homeDefault landing page.
Specific Offer/offers/[offer_id]Directs to offer details.
Offer w/ Location/offers/50323909?location_id=1898267Best practice: include location_id for specificity.
Search Results/offers?search=ice+creamLoads search results page directly.
Offer Listing Page/offersShows the general listing of all available offers.

How It Works

  • The SDK reads the initialEntries value on initialization.
  • The first entry in the array is used as the starting route.
  • Developers can specify dynamic values (e.g., offer_id, location_id) to target specific content.
  • If initialEntries is not set, the SDK defaults to /home.

Best Practices

  • Keep /home as the default unless a program requires direct routing.
  • Use location_id when routing to offers for more relevant user experiences.
  • Limit initialEntries to one route unless intentionally controlling a navigation stack.