segmentio / segmentio/analytics.js-integrations

Optimizely only accepts primitives

Open
#264 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
125
Forks
136
Avg merge
2h 45m
Merged PRs (30d)
1

Description

Hi, we are sending some data nested in Array, or Object types to Segment events, but optimizely only accepts string, numbers, etc, and will error in the client if we try to send an Array for instance.

Any ideas about how we could patch this? We're happy to just have them converted to strings if that is what is suggested, but are wondering if you could shed some insight on the best way to patch it within the integration.

I see that you are already doing some tricks in https://github.com/segmentio/analytics.js-integrations/blob/master/integrations/optimizely/lib/index.js#L94

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at integrations/optimizely/lib/index.js around line 94, where the existing Optimizely data handling is implemented. Determine how nested Array and Object values should be handled without causing the Optimizely client to error; done means Segment events with those values are accepted by the integration.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.