Show olark for all authenticated users.

master
Nick Sergeant 2015-07-24 21:41:37 -04:00
parent 3431d70083
commit fa9f266bb6
1 changed files with 13 additions and 15 deletions

View File

@ -469,7 +469,7 @@
} }
})(); })();
</script> </script>
{% if request.user.profile.get_account_age <= 7 or request.user.profile.is_pro %} {% if request.user.is_authenticated %}
{% block olark %} {% block olark %}
<!-- begin olark code --> <!-- begin olark code -->
<script data-cfasync="false" type='text/javascript'>/*<![CDATA[*/window.olark||(function(c){var f=window,d=document,l=f.location.protocol=="https:"?"https:":"http:",z=c.name,r="load";var nt=function(){ <script data-cfasync="false" type='text/javascript'>/*<![CDATA[*/window.olark||(function(c){var f=window,d=document,l=f.location.protocol=="https:"?"https:":"http:",z=c.name,r="load";var nt=function(){
@ -491,20 +491,18 @@
/* custom configuration goes here (www.olark.com/documentation) */ /* custom configuration goes here (www.olark.com/documentation) */
olark.identify('9104-133-10-2665');/*]]>*/</script><noscript><a href="https://www.olark.com/site/9104-133-10-2665/contact" title="Contact us" target="_blank">Questions? Feedback?</a> powered by <a href="http://www.olark.com?welcome" title="Olark live chat software">Olark live chat software</a></noscript> olark.identify('9104-133-10-2665');/*]]>*/</script><noscript><a href="https://www.olark.com/site/9104-133-10-2665/contact" title="Contact us" target="_blank">Questions? Feedback?</a> powered by <a href="http://www.olark.com?welcome" title="Olark live chat software">Olark live chat software</a></noscript>
<!-- end olark code --> <!-- end olark code -->
{% if request.user.is_authenticated %} <script type="text/javascript">
<script type="text/javascript"> olark('api.visitor.updateEmailAddress', { emailAddress: '{{ request.user.email }}' });
olark('api.visitor.updateEmailAddress', { emailAddress: '{{ request.user.email }}' }); olark('api.visitor.updateFullName', { fullName: '{{ request.user.username }}' });
olark('api.visitor.updateFullName', { fullName: '{{ request.user.username }}' }); olark('api.visitor.updateCustomFields', {
olark('api.visitor.updateCustomFields', { userId: {{ request.user.id }},
userId: {{ request.user.id }}, createdAt: '{{ request.user.date_joined }}',
createdAt: '{{ request.user.date_joined }}', sniptsCount: {% snipts_count_for_user %},
sniptsCount: {% snipts_count_for_user %}, isPro: window.user_is_pro,
isPro: window.user_is_pro, blogDomain: '{{ request.user.profile.blog_domain }}',
blogDomain: '{{ request.user.profile.blog_domain }}', proDate: '{% firstof request.user.profile.pro_date 'null' %}'
proDate: '{% firstof request.user.profile.pro_date 'null' %}' });
}); </script>
</script>
{% endif %}
{% endblock %} {% endblock %}
{% endif %} {% endif %}
{% endif %} {% endif %}