BranchMetrics / web-branch-deep-linking-attribution

The Branch Web SDK for deep linking and attribution. Once initialized, the Branch Web SDK allows you to create and share links with a banner (web only), over SMS, or your own methods by generating deep links. It also offers event tracking, access to referrals, and management of credits.
https://help.branch.io/developers-hub/docs/web-sdk-overview
MIT License
287 stars 101 forks source link

[INTENG-17048] : Fix og tags for redirecturl #841

Closed JagadeeshKaricherla-branch closed 1 year ago

JagadeeshKaricherla-branch commented 1 year ago

Pull Request Template

Description

Fixes # (issue) : INTENG-17048

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

With the below setup

<meta property="og:title" content="Wrong title">
<meta property="og:description" content="Wrong Description">

and following link data

var linkData = {
    campaign: 'Test',
    alias: '',
    data: {
        $fallback_url: 'https://www.tumblr.com/etucker/694690143661146112/spiritusloci-sir-corgi-created-in-midjourney?source=share'
    }
};

Before :

image

After :

image

After the fix with the below link data :

var linkData = {
    campaign: 'Test',
    alias: '',
    data: {
        $fallback_url: 'https://www.tumblr.com/etucker/694690143661146112/spiritusloci-sir-corgi-created-in-midjourney?source=share',
        '$og_title': 'My App',
        '$og_description': 'My app\'s description.'
    }
};
image

After the fix with the below link data :

var linkData = {
    campaign: 'Test',
    alias: '',
    data: {
        '$og_title': 'My App',
        '$og_description': 'My app\'s description.'
    }
};
image

JS Budget Check

Please mention the size in kb before abd after this PR

Files Before After
dist/build.js. 164kb 164kb
dist/build.min.js 74kb 74kb

Checklist:

Mentions:

List the person or team responsible for reviewing proposed changes.