<commit_before>//
// Analytics for the main layout. This includes buttons in the header, footer
// or any other actions that occur on each page.
//

// Track pageview
analytics.page();

// Track 15 second bounce rate
setTimeout(function() {
  analytics.track('time on page more than 15 seconds', { category: '15 Seconds' });
}, 15000);

// Track 3 Minute bounce rate
setTimeout(function() {
  analytics.track('time on page more than 3 minutes', { category: '3 Minutes' });
}, 180000);

// Tracking Snowplow page view. TODO: Remove when we phase out Snowplow.
snowplow('trackPageView');

// Signs up a user to the Gallery Insights (New) List
$('.js-articles-insights-subscribe').click(function(e){
  var email = $(e.currentTarget).prev('input').val()
  var firstName = ''
  var lastName = ''
  if(sd.CURRENT_USER && sd.CURRENT_USER.name){
    firstName = sd.CURRENT_USER.name.split(' ')[0]
    lastName = sd.CURRENT_USER.name.split(' ')[1]
  }
  analytics.identify('95ac2900c4', {
    email: email,
    firstName: firstName,
    lastName: lastName
  })
  $('.articles-insights').fadeOut()
  $('.articles-insights-thanks').fadeIn()
  $('.cta-bar-small').fadeOut(function(){
    $('.cta-bar-thanks').fadeIn()
  })
  setTimeout(function(){$('.cta-bar-defer').click()}, 2000)
})<commit_msg>Add source<commit_after>//
// Analytics for the main layout. This includes buttons in the header, footer
// or any other actions that occur on each page.
//

// Track pageview
analytics.page();

// Track 15 second bounce rate
setTimeout(function() {
  analytics.track('time on page more than 15 seconds', { category: '15 Seconds' });
}, 15000);

// Track 3 Minute bounce rate
setTimeout(function() {
  analytics.track('time on page more than 3 minutes', { category: '3 Minutes' });
}, 180000);

// Tracking Snowplow page view. TODO: Remove when we phase out Snowplow.
snowplow('trackPageView');

// Signs up a user to the Gallery Insights (New) List
$('.js-articles-insights-subscribe').click(function(e){
  var email = $(e.currentTarget).prev('input').val()
  var firstName = ''
  var lastName = ''
  if(sd.CURRENT_USER && sd.CURRENT_USER.name){
    firstName = sd.CURRENT_USER.name.split(' ')[0]
    lastName = sd.CURRENT_USER.name.split(' ')[1]
  }
  analytics.identify('95ac2900c4', {
    email: email,
    FNAME: firstName,
    LNAME: lastName,
    MMERGE3: 'Opt-in (artsy.net)'
  })
  $('.articles-insights').fadeOut()
  $('.articles-insights-thanks').fadeIn()
  $('.cta-bar-small').fadeOut(function(){
    $('.cta-bar-thanks').fadeIn()
  })
  setTimeout(function(){$('.cta-bar-defer').click()}, 2000)
})
{'fraction_non_alphanumeric': 0.17263969171483623, 'fraction_numerical': 0.02581888246628131, 'mean_word_length': 3.9447619047619047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5490145', 'n_tokens_mistral': 923, 'n_tokens_neox': 855, 'n_words': 224}