Skip to content

Not getting Google Broadcast referrer data #2

@Pruthvirajcodewave

Description

@Pruthvirajcodewave

Hi, great npm for receiving install referrals.

If I log and check the log for
RNAndroidBroadcastReceiverForReferrerModule.reactContext I am getting null.

`private void sendEvent(String eventName, WritableMap map) {

    try{
        ReactContext reactContext = RNAndroidBroadcastReceiverForReferrerModule.reactContext;

        reactContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
                .emit(eventName, map);
    }
    catch(Exception e){
        Log.d("ReactNativeJS","Exception in sendEvent in ReferrerBroadcastReceiver is:"+e.toString());


    }

}`

Since its giving null, the above code is not executing properly and it's coming to catch.

I am able to receive a referral in the following code.
let referrerValue = await RNAndroidBroadcastReceiverForReferrer.getReferrerData();
Is there any way to update google analytics as soon as the app gets installed. If we had used the default google receiver com.google.android.gms.analytics.CampaignTrackingReceiver it would by default update the installs to google analytics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions