Closed howardengelhart closed 8 years ago
@minznerjosh @howardengelhart This will be handled basically the same as the card's links
hash.
Currently, the shareLinks
hash on a card looks like this:
card.shareLinks = {
facebook: "http://mypage.com/from/facebook",
twitter: "http://mypage.com/from/twitter",
};
When a card is retrieved from a public endpoint, each value in the shareLinks
hash will be transformed into an object like so:
card.shareLinks = {
facebook: {
uri: 'http://mypage.com/from/facebook',
tracking: [
'//cinema6.com/pixel.gif?params'
]
},
twitter: {
uri: 'http://mypage.com/from/twitter',
tracking: [
'//cinema6.com/pixel.gif?params'
]
}
};
The params on the tracking pixel urls will be the same as those on other tracking urls, but the event
param will be set to shareLink.<key>
, e.g. shareLink.facebook
and shareLink.twitter
for these examples.
Also, like the links
hash, the code will handle the possibility that entries in the shareLink
hash are already objects with a tracking
array defined, and simply add pixel urls to the preexisting array.
Closed by #665
Needs to be broken out by share-site.. ie share-facebook, share-twitter, share-pinterest.
Ref: cinema6/minireelinator#1032