Comments (9)
We should definitely be cleaning up some of the limitations in the integration.
Iām thinking we should replace the offending characters, automatically upercase the event and truncate event names to 40 characters. Does that seem reasonable?
from analytics-ios-integration-facebook-app-events.
Truncating to 40 seems fine (I'm sure there are cases where it is less the ideal but I guess notes in documentation as well would support this decision and then users could understand why it's done).
Replacing or removing all offending characters makes sense but not sure how aggressive it should be.
Not sure why uppercasing all?
We use the naming convention of PLATFORM.PAGE.EVENT e.g. app.search.successful or site.home.button-pressed. So the period is useful to us and removing it would break the naming.
Submitted a PR for just truncating as that is less controversial I imagine :)
from analytics-ios-integration-facebook-app-events.
Ah sorry I read that incorrectly, yeah definitely no need to uppercase.
from analytics-ios-integration-facebook-app-events.
fixed in #5
from analytics-ios-integration-facebook-app-events.
We still need to add a check for "and must be contain only alphanumerics, _, - or spaces, starting with alphanumeric or _". I haven't heard of this causing an issue for anyone so will leave the issue closed, but if you do, please comment and we'll reopen.
from analytics-ios-integration-facebook-app-events.
In the end I hard-coded the following line line to replace the '.' in my event names:
truncatedEvent
= [truncatedEvent stringByReplacingOccurrencesOfString:@"." withString:@"-"];
I didn't make a PR for this because its specific to our usage. I think the best approach would be to replace all offending characters with a default e.g. _
but also allow users to replace it themselves by passing in a param? However, I'm not sure this is possible?
from analytics-ios-integration-facebook-app-events.
Yeah we could, but I don't want to make it an option (at least for now) - replacing .
with -
sounds like a sensible default.
from analytics-ios-integration-facebook-app-events.
@f2prateek I've created a PR #6 which replaces all offending characters with -
. May want to take a look as I'm a little rusty with Objective-C and can't recall best practices.
from analytics-ios-integration-facebook-app-events.
Can we reopen this feature request? We use periods in our event naming scheme as well and I would like to avoid making changes to the segment library.
from analytics-ios-integration-facebook-app-events.
Related Issues (8)
- Handle when screen.category is provided HOT 1
- Update Facebook SDK version to 5.x HOT 6
- Ignore event properties that are not NSString or NSNumber HOT 1
- Update Facebook SDK to version 8.x HOT 2
- Warning message to update Facebook SDK for iOS 14 HOT 3
- Please add support for Swift Package Manager HOT 2
- Bump FBSDKCore to 14.x HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from analytics-ios-integration-facebook-app-events.