【问题标题】:Autofill with LinkedIn form使用 LinkedIn 表单自动填充
【发布时间】:2018-10-30 18:57:05
【问题描述】:

我已经应用了链接自动填充功能,但我有两个问题:

  1. 这是页面链接:该页面托管在 HubSpot CMS 上 - https://inboundmarketing.inboundmantra.com/inbound-marketing-company-contact-inbound-mantra

这是上述页面的linkedIn自动填充按钮的代码:

<button id="autofill-button">
    <span class="logo">IN</span>
    <div class="button-text-container">
      <span class="button-text">
        AutoFill with <strong>LinkedIn</strong>
      </span>
    </div>
</button>

<style>
#autofill-button {
    height: 33px;
    width: 174px;
    cursor: pointer;
    color: #FFF;
    padding: 0;
    border: 1px #2D6FA8 solid;
    border-radius: 3px;
    font-size: 12px;
    position: relative;
    overflow: hidden;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    background: #79adcb;
    background: -webkit-linear-gradient(top, #79adcb 15%, #2373ac 100%);
    background: linear-gradient(to bottom, #79adcb 15%, #2373ac 100%);
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    font-family: Arial;
    font-size: 12px;
    display: inline-block;
}
#autofill-button:hover {
    background: #5a8193;
    background: -webkit-linear-gradient(top, #5a8193 15%, #1e4d72 100%);
    background: linear-gradient(to bottom, #5a8193 15%, #1e4d72 100%);
}
#autofill-button:active {
    background: #1e4d72;
    background: -webkit-linear-gradient(top, #1e4d72 15%, #5a8193 100%);
    background: linear-gradient(to bottom, #1e4d72 15%, #5a8193 100%);
}
#autofill-button .logo {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 34px;
    color: transparent;
    background: url(https://www.linkedin.com/scds/common/u/img/sprite/sprite_connect_v13.png) no-repeat scroll 0 -347px transparent;
}
#autofill-button .button-text-container {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: table;
    width: 171px;
    height: 33px;
}
#autofill-button .button-text {
    display: table-cell;
    vertical-align: middle;
}
span.IN-widget {
    height: 0 !important;
    visibility: hidden;
    opacity: 0;
}
</style>

<script>
    $('#autofill-button').click(function(){
    $('span.IN-widget *').click();
});
</script>

<script type="in/Login"></script>
<script type="text/javascript" src="//platform.linkedin.com/in.js">// <![CDATA[
api_key: 81ndwffuhqmres
        authorize: false
        lang: en_US
</script>
<script>
setTimeout(function(){
var callbackScope, extraData;
    function callback(args) {
        var fields = ['first-name', 'last-name', 'email-address', 'id', 'headline', 'pictureUrl', 'positions', 'num-connections'];
        IN.API.Profile("me").fields(fields).result(function(profiles) {
            member = profiles.values[0];
            console.log(member);
            $('[id*="firstname"]').val(member.firstName);
            $('[id*="lastname"]').val(member.lastName);
            $('[id*="email"]').val(member.emailAddress);
            $('#headline').val(member.headline);
            $('#picture').attr("src", member.pictureUrl);
            var i = 0;
            for (position of member.positions.values) {
                $('#position' + (i++)).val(position.company.name + " - " + position.title);
            }
        }).error(function(data) {
            console.log(data);
        });
    }
    IN.Event.on(IN, 'auth', callback, callbackScope, extraData);
},500);
</script>

自动填充了整个字段,但电话号码字段不起作用。

  1. 当我在 WordPress 中运行此代码时,此代码不起作用。

这是页面链接https://www.inboundmantra.com/predictive-lead-scoring

请告诉我如何解决。

提前谢谢...

【问题讨论】:

    标签: wordpress forms linkedin autofill hubspot


    【解决方案1】:

    您是否已将您的域列入白名单?您需要联系 LinkedIn 代表将您的域列入白名单才能使用此功能。

    【讨论】:

    • 是的,我们已将此功能列入白名单。在我们的表单中,其余字段都有效,但只有联系人字段无效。
    猜你喜欢
    • 1970-01-01
    • 2020-10-18
    • 1970-01-01
    • 2015-04-14
    • 1970-01-01
    • 2011-10-22
    • 2018-11-28
    • 2014-06-11
    • 1970-01-01
    相关资源
    最近更新 更多