당신은 또한 이 공급자의 이름으로 뭔가를 이벤트를 onShareButtonClicked 사용할 수 있습니다 여기에
는 Gigya Documention 링크입니다. 네이티브 로그인 버튼 (Google/모바일 용 Facebook)에서는 작동하지 않지만 웹에서 작업하는 경우 필요한 작업을 수행해야합니다. 나는 작업 예제를 첨부하고있다 (페이지에 Gigya API 키가 필요하다).
// Create a div for the widget (or use an existing div on your page)
var newShareDiv = document.createElement('div');
newShareDiv.id='ShareDiv';
newShareDiv.setAttribute('style', 'position: absolute; z-index: 1000; margin: 0px auto; margin-top: 10px !important; width: 200px; height: 20px; background-color: yellow; border: 2 px solid red;')
document.body.appendChild(newShareDiv);
//
// Create the UserAction for sharing
var gigyaShareAction = new gigya.socialize.UserAction();
gigyaShareAction.linkBack = 'https://demo.gigya.com';
gigyaShareAction.userMessage = 'Check this out!';
//
// Define shareButtons
var shareButtons = 'Facebook, Twitter, LinkedIn, Messenger, share';
//
// Define the Share Bar Plugin's params object
var shareParams = {
userAction: gigyaShareAction,
showCounts: 'none',
containerID: 'ShareDiv',
scope: 'both',
privacy: 'public',
iconsOnly: true,
layout: 'horizontal',
noButtonBorders: false,
operationMode: 'simpleShare',
onShareButtonClicked : function(e) {
console.log(e.shareItem.provider);
},
shareButtons: shareButtons // list of providers
};
//
// Load the Share Bar Plugin:
gigya.socialize.showShareBarUI(shareParams);
이 클릭 된 공급자의 이름, 당신은 대안 VAR를 만들 수 있습니다 콘솔에 로그인 한 후 어딘가를 보내거나 데이터와 Google 웹 로그 분석 이벤트가 발생합니다.